Fix new clippy lints (#3304)

This commit is contained in:
Jonas Platte
2025-04-03 23:22:19 +02:00
committed by GitHub
parent af6a595fdf
commit 5429ed9bd5
6 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ where
// so we can call `AsyncRead::lines` and then convert it back to a `Stream`
let body = req.into_body();
let stream = body.into_data_stream();
let stream = stream.map_err(|err| io::Error::new(io::ErrorKind::Other, err));
let stream = stream.map_err(io::Error::other);
let read = StreamReader::new(stream);
let lines_stream = LinesStream::new(read.lines());
+2 -2
View File
@@ -41,11 +41,11 @@ impl<T: Error + 'static> IntoResponse for InternalServerError<T> {
#[cfg(test)]
mod tests {
use super::*;
use std::io::{Error, ErrorKind};
use std::io::Error;
#[test]
fn internal_server_error() {
let response = InternalServerError(Error::new(ErrorKind::Other, "Test")).into_response();
let response = InternalServerError(Error::other("Test")).into_response();
assert_eq!(response.status(), StatusCode::INTERNAL_SERVER_ERROR);
}
}