summaryrefslogtreecommitdiffstats
path: root/openpgp/src/armor.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/armor.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/armor.rs')
-rw-r--r--openpgp/src/armor.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs
index 13d5afa2..3ac9886a 100644
--- a/openpgp/src/armor.rs
+++ b/openpgp/src/armor.rs
@@ -1005,7 +1005,7 @@ impl<'a> Reader<'a> {
// allowed. But, instead of failing, we try to recover, by
// stopping at the first non-whitespace character.
let n = {
- let line = self.source.read_to('\n' as u8)?;
+ let line = self.source.read_to(b'\n')?;
line.iter().position(|&c| {
!c.is_ascii_whitespace()
}).unwrap_or(line.len())
@@ -1048,7 +1048,7 @@ impl<'a> Reader<'a> {
self.source.consume(n);
// Buffer the next line.
- let line = self.source.read_to('\n' as u8)?;
+ let line = self.source.read_to(b'\n')?;
n = line.len();
lines += 1;
@@ -1266,7 +1266,7 @@ impl<'a> Reader<'a> {
};
if data.len() == 5
- && data[0] == '=' as u8
+ && data[0] == b'='
&& data[1..5].iter().all(is_base64_char)
{
/* Found. */