mirror of
https://github.com/actix/actix-web.git
synced 2024-12-26 18:10:37 +00:00
address clippy lints
This commit is contained in:
parent
3d6ea7fe9b
commit
f7d7d92984
4 changed files with 6 additions and 4 deletions
|
@ -481,6 +481,7 @@ mod tests {
|
|||
assert_poll_next_none!(pl);
|
||||
}
|
||||
|
||||
#[allow(clippy::let_unit_value)]
|
||||
#[actix_rt::test]
|
||||
async fn test_unit() {
|
||||
let pl = ();
|
||||
|
|
|
@ -237,7 +237,7 @@ mod tests {
|
|||
.await;
|
||||
|
||||
let mut stream = net::TcpStream::connect(srv.addr()).unwrap();
|
||||
let _ = stream
|
||||
stream
|
||||
.write_all(b"GET /camel HTTP/1.1\r\nConnection: Close\r\n\r\n")
|
||||
.unwrap();
|
||||
let mut data = vec![];
|
||||
|
@ -251,7 +251,7 @@ mod tests {
|
|||
assert!(memmem::find(&data, b"content-length").is_none());
|
||||
|
||||
let mut stream = net::TcpStream::connect(srv.addr()).unwrap();
|
||||
let _ = stream
|
||||
stream
|
||||
.write_all(b"GET /lower HTTP/1.1\r\nConnection: Close\r\n\r\n")
|
||||
.unwrap();
|
||||
let mut data = vec![];
|
||||
|
|
|
@ -183,6 +183,7 @@ mod tests {
|
|||
assert!(Path::<MyStruct>::from_request(&req, &mut pl).await.is_err());
|
||||
}
|
||||
|
||||
#[allow(clippy::let_unit_value)]
|
||||
#[actix_rt::test]
|
||||
async fn test_tuple_extract() {
|
||||
let resource = ResourceDef::new("/{key}/{value}/");
|
||||
|
|
|
@ -113,7 +113,7 @@ pub struct BytesExtractFut {
|
|||
body_fut: HttpMessageBody,
|
||||
}
|
||||
|
||||
impl<'a> Future for BytesExtractFut {
|
||||
impl Future for BytesExtractFut {
|
||||
type Output = Result<Bytes, Error>;
|
||||
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
|
@ -167,7 +167,7 @@ pub struct StringExtractFut {
|
|||
encoding: &'static Encoding,
|
||||
}
|
||||
|
||||
impl<'a> Future for StringExtractFut {
|
||||
impl Future for StringExtractFut {
|
||||
type Output = Result<String, Error>;
|
||||
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
|
|
Loading…
Reference in a new issue