From d8b5d1181f3d735023508369d519e707eb7464a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20K=C4=99pka?= Date: Sun, 13 Jun 2021 11:00:13 +0200 Subject: [PATCH] Add `Copy` derive to `PromptEvent` --- helix-term/src/commands.rs | 4 ++-- helix-term/src/ui/prompt.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 3f6495728..1f0b751d3 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1024,12 +1024,12 @@ fn later(editor: &mut Editor, args: &[&str], event: PromptEvent) { } fn write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) { - write(editor, args, event.clone()); + write(editor, args, event); quit(editor, &[], event); } fn force_write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) { - write(editor, args, event.clone()); + write(editor, args, event); force_quit(editor, &[], event); } diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index c6429736c..1ee0399f0 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -18,7 +18,7 @@ pub struct Prompt { pub doc_fn: Box Option<&'static str>>, } -#[derive(Clone, PartialEq)] +#[derive(Clone, Copy, PartialEq)] pub enum PromptEvent { /// The prompt input has been updated. Update,