Fix future clippy lints (#15519)

- suggestions for tersity using helpers
This commit is contained in:
Stefan Holderbach
2025-04-08 02:51:12 +02:00
committed by GitHub
parent a886e30e04
commit ecb9799b6a
5 changed files with 14 additions and 21 deletions

View File

@@ -437,7 +437,7 @@ impl io::Write for WriterFormatter<'_, '_> {
fn io_error<E>(_: E) -> io::Error {
// Value does not matter because fmt::Debug and fmt::Display impls
// below just map it to fmt::Error
io::Error::new(io::ErrorKind::Other, "fmt error")
io::Error::other("fmt error")
}
let s = str::from_utf8(buf).map_err(io_error)?;
self.inner.write_str(s).map_err(io_error)?;