diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 15:38:26 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:58 +0200 |
commit | 0c538f122d7a498a58f9b380b6be03a40f827c3e (patch) | |
tree | e6f48dacad4a5ab54d8acbbf54f781352688c43e /openpgp/src/keyid.rs | |
parent | 5d029cbf42621452666bd084f7beecb7d3d885a4 (diff) |
Lint: Use byte literals.
- https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r-- | openpgp/src/keyid.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs index fa4ee314..fbf7d875 100644 --- a/openpgp/src/keyid.rs +++ b/openpgp/src/keyid.rs @@ -374,22 +374,22 @@ impl KeyID { for (i, b) in raw.iter().enumerate() { if pretty && i > 0 && i % 2 == 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)) } } |