From 7c4fa18764ed6a6c30125ed6bfc9b025216e9668 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Mon, 21 Jun 2021 12:02:44 -0700 Subject: Fix clippy warnings. --- helix-term/src/commands.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'helix-term/src') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 6ccbaaff..5cb30da6 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1304,7 +1304,10 @@ mod cmd { fn yank_joined_to_clipboard(editor: &mut Editor, args: &[&str], _: PromptEvent) { let (_, doc) = current!(editor); - let separator = args.first().copied().unwrap_or(doc.line_ending.as_str()); + let separator = args + .first() + .copied() + .unwrap_or_else(|| doc.line_ending.as_str()); yank_joined_to_clipboard_impl(editor, separator); } -- cgit v1.2.3-70-g09d2