1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 17:27:18 +02:00

Fix Clippy warnings

This commit is contained in:
Yuki Okushi
2020-02-27 11:20:30 +09:00
parent 7ba14fd113
commit f27dd19093
7 changed files with 7 additions and 13 deletions

View File

@@ -117,7 +117,7 @@ pub fn write_content_length(n: usize, bytes: &mut BytesMut) {
} else if n < 1_000_000 {
let n = n as u32;
let d100000 = (n / 100000) as u8;
let d100000 = (n / 100_000) as u8;
let d10000 = ((n / 10000) % 10) as u8;
let d1000 = ((n / 1000) % 10) as u8;
let d100 = ((n / 100) % 10) as u8;
@@ -149,7 +149,7 @@ pub(crate) fn write_usize(n: usize, bytes: &mut BytesMut) {
let lsd = (n % 10) as u8;
// remove the lsd from n
n = n / 10;
n /= 10;
buf.put_u8(DIGITS_START + lsd);
}