From 938484de95445a2af931515d2b7252612c575da7 Mon Sep 17 00:00:00 2001 From: Kornel Date: Sun, 15 Dec 2019 20:05:25 +0000 Subject: [PATCH] Change deprecated range syntax --- mime-parse/src/lib.rs | 2 +- mime-parse/src/rfc7231.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mime-parse/src/lib.rs b/mime-parse/src/lib.rs index f7320572..8d18e0f7 100644 --- a/mime-parse/src/lib.rs +++ b/mime-parse/src/lib.rs @@ -79,7 +79,7 @@ impl fmt::Debug for Byte { b'\t' => f.write_str("'\\t'"), b'\\' => f.write_str("'\\'"), b'\0' => f.write_str("'\\0'"), - 0x20...0x7f => write!(f, "'{}'", self.0 as char), + 0x20..=0x7f => write!(f, "'{}'", self.0 as char), _ => write!(f, "'\\x{:02x}'", self.0), } } diff --git a/mime-parse/src/rfc7231.rs b/mime-parse/src/rfc7231.rs index 89f15fcd..50297791 100644 --- a/mime-parse/src/rfc7231.rs +++ b/mime-parse/src/rfc7231.rs @@ -333,9 +333,9 @@ mod tests { for (i, &valid) in super::TOKEN_MAP.iter().enumerate() { let i = i as u8; let should = match i { - b'a'...b'z' | - b'A'...b'Z' | - b'0'...b'9' | + b'a'..=b'z' | + b'A'..=b'Z' | + b'0'..=b'9' | b'!' | b'#' | b'$' |