diff options
author | 2020-07-11 00:11:45 +0200 | |
---|---|---|
committer | 2020-07-11 00:11:45 +0200 | |
commit | 4314ce36f4242398a3228defc70e056e1e87f175 (patch) | |
tree | b7d7e1a7ec15171a130e41c5c2c17e27b10432d1 /native | |
parent | a1210c9dae3ff7cf1d7afa08eadc76b4d7aaa7b9 (diff) | |
download | iced-4314ce36f4242398a3228defc70e056e1e87f175.tar.gz iced-4314ce36f4242398a3228defc70e056e1e87f175.tar.bz2 iced-4314ce36f4242398a3228defc70e056e1e87f175.zip |
Remove redundant `min` checks in `Editor`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/text_input/editor.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/widget/text_input/editor.rs b/native/src/widget/text_input/editor.rs index b836f105..20e42567 100644 --- a/native/src/widget/text_input/editor.rs +++ b/native/src/widget/text_input/editor.rs @@ -18,7 +18,7 @@ impl<'a> Editor<'a> { match self.cursor.selection(self.value) { Some((left, right)) => { self.cursor.move_left(self.value); - self.value.remove_many(left, right.min(self.value.len())); + self.value.remove_many(left, right); } _ => (), } @@ -33,7 +33,7 @@ impl<'a> Editor<'a> { match self.cursor.selection(self.value) { Some((left, right)) => { self.cursor.move_left(self.value); - self.value.remove_many(left, right.min(self.value.len())); + self.value.remove_many(left, right); } _ => (), } @@ -47,7 +47,7 @@ impl<'a> Editor<'a> { match self.cursor.selection(self.value) { Some((start, end)) => { self.cursor.move_left(self.value); - self.value.remove_many(start, end.min(self.value.len())); + self.value.remove_many(start, end); } None => { let start = self.cursor.start(self.value); |