Run cargo fmt
This commit is contained in:
parent
0722d5e3ec
commit
983aa1b366
10 changed files with 57 additions and 48 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
_ => (),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue