From b935fac9576cf333e22b82e40da8c4d73c8e547d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Fri, 25 Feb 2022 13:06:11 +0900 Subject: [PATCH] Fix 1.60 lints --- helix-term/src/ui/completion.rs | 2 +- helix-tui/src/widgets/reflow.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index adaac1a7c..a6e92a19d 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -165,7 +165,7 @@ impl Completion { if let Some(additional_edits) = item .additional_text_edits .as_ref() - .or_else(|| resolved_additional_text_edits.as_ref()) + .or(resolved_additional_text_edits.as_ref()) { if !additional_edits.is_empty() { let transaction = util::generate_transaction_from_edits( diff --git a/helix-tui/src/widgets/reflow.rs b/helix-tui/src/widgets/reflow.rs index 33e52bb4e..380719405 100644 --- a/helix-tui/src/widgets/reflow.rs +++ b/helix-tui/src/widgets/reflow.rs @@ -490,7 +490,7 @@ mod test { assert_eq!(word_wrapper, vec!["AAAAAAAAAAAAAAA", "AAAA\u{00a0}AAA",]); // Ensure that if the character was a regular space, it would be wrapped differently. - let text_space = text.replace("\u{00a0}", " "); + let text_space = text.replace('\u{00a0}', " "); let (word_wrapper_space, _) = run_composer(Composer::WordWrapper { trim: true }, &text_space, width); assert_eq!(word_wrapper_space, vec!["AAAAAAAAAAAAAAA AAAA", "AAA",]);