diff options
author | 2021-04-12 23:23:47 -0700 | |
---|---|---|
committer | 2021-04-12 23:23:47 -0700 | |
commit | 983aa1b3665c6b546700767d21d73de72372ddad (patch) | |
tree | 3817ea9bcd373a099cfbfed155f8c489daf92865 /native | |
parent | 0722d5e3ec307fd82a1cc76593d17d83cf828943 (diff) | |
download | iced-983aa1b3665c6b546700767d21d73de72372ddad.tar.gz iced-983aa1b3665c6b546700767d21d73de72372ddad.tar.bz2 iced-983aa1b3665c6b546700767d21d73de72372ddad.zip |
Run cargo fmt
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/pane_grid.rs | 9 | ||||
-rw-r--r-- | native/src/widget/text_input/cursor.rs | 4 | ||||
-rw-r--r-- | native/src/widget/text_input/editor.rs | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index 44028f5e..3df7b156 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -209,10 +209,11 @@ where cursor_position: Point, messages: &mut Vec<Message>, ) { - let mut clicked_region = - self.elements.iter().zip(layout.children()).filter( - |(_, layout)| layout.bounds().contains(cursor_position), - ); + let mut clicked_region = self + .elements + .iter() + .zip(layout.children()) + .filter(|(_, layout)| layout.bounds().contains(cursor_position)); if let Some(((pane, content), layout)) = clicked_region.next() { if let Some(on_click) = &self.on_click { diff --git a/native/src/widget/text_input/cursor.rs b/native/src/widget/text_input/cursor.rs index 1e7aee83..4f3b159b 100644 --- a/native/src/widget/text_input/cursor.rs +++ b/native/src/widget/text_input/cursor.rs @@ -113,7 +113,7 @@ impl Cursor { State::Selection { start, end } if end > 0 => { self.select_range(start, end - 1) } - _ => (), + _ => {} } } @@ -125,7 +125,7 @@ impl Cursor { State::Selection { start, end } if end < value.len() => { self.select_range(start, end + 1) } - _ => (), + _ => {} } } diff --git a/native/src/widget/text_input/editor.rs b/native/src/widget/text_input/editor.rs index 20e42567..0b50a382 100644 --- a/native/src/widget/text_input/editor.rs +++ b/native/src/widget/text_input/editor.rs @@ -20,7 +20,7 @@ impl<'a> Editor<'a> { self.cursor.move_left(self.value); self.value.remove_many(left, right); } - _ => (), + _ => {} } self.value.insert(self.cursor.end(self.value), character); @@ -35,7 +35,7 @@ impl<'a> Editor<'a> { self.cursor.move_left(self.value); self.value.remove_many(left, right); } - _ => (), + _ => {} } self.value.insert_many(self.cursor.end(self.value), content); |