Skip to content

Commit

Permalink
Various Clippy fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltratt committed May 18, 2024
1 parent e812719 commit 687c17d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -578,7 +578,7 @@ fn fmt_raw(f: &mut fmt::Formatter, text: &str) -> fmt::Result {
f,
"Literal text:{}{}",
lhs,
text.split("\n").collect::<Vec<_>>().join(lhs)
text.split('\n').collect::<Vec<_>>().join(lhs)
)
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 687c17d

Please sign in to comment.