Fix lints for Rust 1.81 (#6363)

* Fix lints for Rust 1.81
This commit is contained in:
Michael Sproul
2024-09-06 11:45:34 +10:00
committed by GitHub
parent df19b6220a
commit c824142a6d
7 changed files with 16 additions and 35 deletions

View File

@@ -228,7 +228,7 @@ impl ZeroizeString {
/// Remove any number of newline or carriage returns from the end of a vector of bytes.
pub fn without_newlines(&self) -> ZeroizeString {
let stripped_string = self.0.trim_end_matches(|c| c == '\r' || c == '\n').into();
let stripped_string = self.0.trim_end_matches(['\r', '\n']).into();
Self(stripped_string)
}
}