Merge pull request #202 from forkgull/notgull/clippy

Please clippy
This commit is contained in:
Josh Triplett 2023-10-08 13:06:00 +08:00 committed by GitHub
commit 4de64c18de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -222,7 +222,7 @@ impl<R: Read + Unpin> Read for ChunkedDecoder<R> {
}
}
State::TrailerSending(ref mut fut) => {
let _ = ready!(Pin::new(fut).poll(cx));
ready!(Pin::new(fut).poll(cx));
this.state = State::Done;
}
State::Done => return Poll::Ready(Ok(0)),

View File

@ -375,8 +375,8 @@ impl Display for HttpDate {
buf[0] = week_day[0];
buf[1] = week_day[1];
buf[2] = week_day[2];
buf[5] = b'0' + (self.day / 10) as u8;
buf[6] = b'0' + (self.day % 10) as u8;
buf[5] = b'0' + (self.day / 10);
buf[6] = b'0' + (self.day % 10);
buf[8] = month[0];
buf[9] = month[1];
buf[10] = month[2];
@ -384,12 +384,12 @@ impl Display for HttpDate {
buf[13] = b'0' + (self.year / 100 % 10) as u8;
buf[14] = b'0' + (self.year / 10 % 10) as u8;
buf[15] = b'0' + (self.year % 10) as u8;
buf[17] = b'0' + (self.hour / 10) as u8;
buf[18] = b'0' + (self.hour % 10) as u8;
buf[20] = b'0' + (self.minute / 10) as u8;
buf[21] = b'0' + (self.minute % 10) as u8;
buf[23] = b'0' + (self.second / 10) as u8;
buf[24] = b'0' + (self.second % 10) as u8;
buf[17] = b'0' + (self.hour / 10);
buf[18] = b'0' + (self.hour % 10);
buf[20] = b'0' + (self.minute / 10);
buf[21] = b'0' + (self.minute % 10);
buf[23] = b'0' + (self.second / 10);
buf[24] = b'0' + (self.second % 10);
f.write_str(from_utf8(&buf[..]).unwrap())
}
}