diff options
author | 2024-02-03 14:19:08 +0100 | |
---|---|---|
committer | 2024-02-03 14:19:08 +0100 | |
commit | 719798441db735149018e2eab47f377692c29196 (patch) | |
tree | 35b55485fe12369abee97dbf63c9d21e67a36fc6 /widget/src | |
parent | db9ca1a147f2c57c362dbdb90cde56d1646dccc1 (diff) | |
download | iced-719798441db735149018e2eab47f377692c29196.tar.gz iced-719798441db735149018e2eab47f377692c29196.tar.bz2 iced-719798441db735149018e2eab47f377692c29196.zip |
Fix `clippy` lints
Diffstat (limited to 'widget/src')
-rw-r--r-- | widget/src/text_editor.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index edc2e386..8d431991 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -406,12 +406,13 @@ where shell.publish(on_edit(action)); } - Update::Scroll(mut lines) => { - lines += state.partial_scroll; + Update::Scroll(lines) => { + let lines = lines + state.partial_scroll; state.partial_scroll = lines.fract(); + shell.publish(on_edit(Action::Scroll { lines: lines as i32, - })) + })); } Update::Unfocus => { state.is_focused = false; |