From 0c538f122d7a498a58f9b380b6be03a40f827c3e Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Wed, 7 Apr 2021 15:38:26 +0200 Subject: Lint: Use byte literals. - https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 --- openpgp/src/fingerprint.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'openpgp/src/fingerprint.rs') diff --git a/openpgp/src/fingerprint.rs b/openpgp/src/fingerprint.rs index cccae03e..eba7cfa5 100644 --- a/openpgp/src/fingerprint.rs +++ b/openpgp/src/fingerprint.rs @@ -256,26 +256,26 @@ impl Fingerprint { for (i, b) in raw.iter().enumerate() { if pretty && i > 0 && i % 2 == 0 { - output.push(' ' as u8); + output.push(b' '); } if pretty && i > 0 && i % 10 == 0 { - output.push(' ' as u8); + output.push(b' '); } let top = b >> 4; let bottom = b & 0xFu8; if top < 10u8 { - output.push('0' as u8 + top) + output.push(b'0' + top) } else { - output.push('A' as u8 + (top - 10u8)) + output.push(b'A' + (top - 10u8)) } if bottom < 10u8 { - output.push('0' as u8 + bottom) + output.push(b'0' + bottom) } else { - output.push('A' as u8 + (bottom - 10u8)) + output.push(b'A' + (bottom - 10u8)) } } -- cgit v1.2.3