From 687c17d23c3bfdb6605755a94e221c26a424dee2 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Sat, 18 May 2024 08:02:29 +0100 Subject: [PATCH] Various Clippy fixes. --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c9f8229..a6482d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -557,7 +557,7 @@ impl fmt::Display for FMatchError { ), OutputFormatter::InputThenSummary => { fmt_raw(f, &self.text)?; - writeln!(f, "")?; + writeln!(f)?; fmt_summary( f, &self.ptn, @@ -578,7 +578,7 @@ fn fmt_raw(f: &mut fmt::Formatter, text: &str) -> fmt::Result { f, "Literal text:{}{}", lhs, - text.split("\n").collect::>().join(lhs) + text.split('\n').collect::>().join(lhs) ) } @@ -632,9 +632,9 @@ fn fmt_summary( }; writeln!(f, "Pattern (error at line {}):", ptn_line_off)?; - display_lines(f, &ptn, ptn_line_off)?; + display_lines(f, ptn, ptn_line_off)?; writeln!(f, "\nText (error at line {}):", text_line_off)?; - display_lines(f, &text, text_line_off) + display_lines(f, text, text_line_off) } /// A short error message. We don't reuse the longer message from `Display` as a Rust panic