From 4293cea79c09e7fefb07793f4064a0a1f48747cd Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sat, 23 Sep 2023 10:59:53 -0700 Subject: [PATCH] Please clippy Signed-off-by: John Nunley --- src/chunked/decoder.rs | 2 +- src/date.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/chunked/decoder.rs b/src/chunked/decoder.rs index 7b5e8fc..b25cd9a 100644 --- a/src/chunked/decoder.rs +++ b/src/chunked/decoder.rs @@ -222,7 +222,7 @@ impl Read for ChunkedDecoder { } } 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)), diff --git a/src/date.rs b/src/date.rs index 5142240..1037235 100644 --- a/src/date.rs +++ b/src/date.rs @@ -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()) } }