From 9101570e6cfd1e7ea36c20b8709201168e82df90 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Tue, 8 Dec 2020 00:30:31 +0100 Subject: [PATCH] clippy fix --- src/components/externaleditor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/externaleditor.rs b/src/components/externaleditor.rs index b20b2f78..b292db21 100644 --- a/src/components/externaleditor.rs +++ b/src/components/externaleditor.rs @@ -81,10 +81,10 @@ impl ExternalEditorComponent { // does not address spaces in pn let mut echars = editor.chars().peekable(); - let command: String = if *echars.peek().ok_or_else(|| { + let first_char = *echars.peek().ok_or_else(|| { anyhow!("editor configuration set to empty string") - })? == '\"' - { + })?; + let command: String = if first_char == '\"' { echars .by_ref() .skip(1)