on master help sign in
Add `Copy` derive to `PromptEvent`
commitd8b5d1181f3d735023508369d519e707eb7464a1 authorWojciech Kępka <wojtek.kepka@protonmail.com> dateSun 13 Jun 2021, 11:00 (5 years ago) parentb500a2a
2 files changed+3−3
helix-term/src/commands.rs+2−2 helix-term/src/ui/prompt.rs+1−1
helix-term/src/commands.rs+2−2
@@ -1024,12 +1024,12 @@ mod cmd {
10241024 }
10251025
10261026 fn write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
1027− write(editor, args, event.clone());
1027+ write(editor, args, event);
10281028 quit(editor, &[], event);
10291029 }
10301030
10311031 fn force_write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
1032− write(editor, args, event.clone());
1032+ write(editor, args, event);
10331033 force_quit(editor, &[], event);
10341034 }
10351035
helix-term/src/ui/prompt.rs+1−1
@@ -18,7 +18,7 @@ pub struct Prompt {
1818 pub doc_fn: Box<dyn Fn(&str) -> Option<&'static str>>,
1919}
2020
21−#[derive(Clone, PartialEq)]
21+#[derive(Clone, Copy, PartialEq)]
2222pub enum PromptEvent {
2323 /// The prompt input has been updated.
2424 Update,