summaryrefslogtreecommitdiffstats
path: root/openpgp/src/fingerprint.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 15:38:26 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:58 +0200
commit0c538f122d7a498a58f9b380b6be03a40f827c3e (patch)
treee6f48dacad4a5ab54d8acbbf54f781352688c43e /openpgp/src/fingerprint.rs
parent5d029cbf42621452666bd084f7beecb7d3d885a4 (diff)
Lint: Use byte literals.
- https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
Diffstat (limited to 'openpgp/src/fingerprint.rs')
-rw-r--r--openpgp/src/fingerprint.rs12
1 files changed, 6 insertions, 6 deletions
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))
}
}