Run cargo fmt with Rust 1.72
This commit is contained in:
parent
96b435488a
commit
36120d5685
3 changed files with 21 additions and 11 deletions
|
|
@ -39,7 +39,9 @@ impl Frame {
|
|||
}
|
||||
|
||||
pub fn fill(&mut self, path: &Path, fill: impl Into<Fill>) {
|
||||
let Some(path) = convert_path(path) else { return };
|
||||
let Some(path) = convert_path(path) else {
|
||||
return;
|
||||
};
|
||||
let fill = fill.into();
|
||||
|
||||
self.primitives
|
||||
|
|
@ -57,7 +59,9 @@ impl Frame {
|
|||
size: Size,
|
||||
fill: impl Into<Fill>,
|
||||
) {
|
||||
let Some(path) = convert_path(&Path::rectangle(top_left, size)) else { return };
|
||||
let Some(path) = convert_path(&Path::rectangle(top_left, size)) else {
|
||||
return;
|
||||
};
|
||||
let fill = fill.into();
|
||||
|
||||
self.primitives
|
||||
|
|
@ -73,7 +77,9 @@ impl Frame {
|
|||
}
|
||||
|
||||
pub fn stroke<'a>(&mut self, path: &Path, stroke: impl Into<Stroke<'a>>) {
|
||||
let Some(path) = convert_path(path) else { return };
|
||||
let Some(path) = convert_path(path) else {
|
||||
return;
|
||||
};
|
||||
|
||||
let stroke = stroke.into();
|
||||
let skia_stroke = into_stroke(&stroke);
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ pub fn update<Message>(
|
|||
match event {
|
||||
touch::Event::FingerPressed { .. } => {
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
return event::Status::Ignored
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
state.scroll_area_touched_at = Some(cursor_position);
|
||||
|
|
@ -603,7 +603,7 @@ pub fn update<Message>(
|
|||
state.scroll_area_touched_at
|
||||
{
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
return event::Status::Ignored
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
let delta = Vector::new(
|
||||
|
|
@ -648,7 +648,7 @@ pub fn update<Message>(
|
|||
| Event::Touch(touch::Event::FingerMoved { .. }) => {
|
||||
if let Some(scrollbar) = scrollbars.y {
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
return event::Status::Ignored
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
state.scroll_y_to(
|
||||
|
|
@ -678,7 +678,7 @@ pub fn update<Message>(
|
|||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left))
|
||||
| Event::Touch(touch::Event::FingerPressed { .. }) => {
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
return event::Status::Ignored
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
if let (Some(scroller_grabbed_at), Some(scrollbar)) =
|
||||
|
|
@ -722,7 +722,7 @@ pub fn update<Message>(
|
|||
Event::Mouse(mouse::Event::CursorMoved { .. })
|
||||
| Event::Touch(touch::Event::FingerMoved { .. }) => {
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
return event::Status::Ignored
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
if let Some(scrollbar) = scrollbars.x {
|
||||
|
|
@ -753,7 +753,7 @@ pub fn update<Message>(
|
|||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left))
|
||||
| Event::Touch(touch::Event::FingerPressed { .. }) => {
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
return event::Status::Ignored
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
if let (Some(scroller_grabbed_at), Some(scrollbar)) =
|
||||
|
|
|
|||
|
|
@ -693,7 +693,9 @@ where
|
|||
let state = state();
|
||||
|
||||
if let Some(focus) = &mut state.is_focused {
|
||||
let Some(on_input) = on_input else { return event::Status::Ignored };
|
||||
let Some(on_input) = on_input else {
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
if state.is_pasting.is_none()
|
||||
&& !state.keyboard_modifiers.command()
|
||||
|
|
@ -716,7 +718,9 @@ where
|
|||
let state = state();
|
||||
|
||||
if let Some(focus) = &mut state.is_focused {
|
||||
let Some(on_input) = on_input else { return event::Status::Ignored };
|
||||
let Some(on_input) = on_input else {
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
let modifiers = state.keyboard_modifiers;
|
||||
focus.updated_at = Instant::now();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue