New version of clippy has a lot of new lints

Lots of new clippy lints due to toolchain upgrade.

Made the Message::error field pub(crate) again, it was the odd one out
and it seemed a reasonable way to shut up clippy.
This commit is contained in:
Floris Bruynooghe
2021-01-18 22:57:41 +01:00
parent 2435803fa3
commit 83dd1c6232
10 changed files with 98 additions and 86 deletions

View File

@@ -31,7 +31,9 @@ fn remove_message_footer<'a>(lines: &'a [&str]) -> (&'a [&'a str], bool) {
// use that only when no other footer is found
// and if the line before is empty and the line after is not empty
"--" => {
if (ix == 0 || lines[ix - 1] == "") && ix != lines.len() - 1 && lines[ix + 1] != ""
if (ix == 0 || lines[ix - 1].is_empty())
&& ix != lines.len() - 1
&& !lines[ix + 1].is_empty()
{
nearly_standard_footer = Some(ix);
}