diff --git a/Cargo.toml b/Cargo.toml index 2a899df..2486ddf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asn1_der" -version = "0.6.2" +version = "0.6.3" authors = ["KizzyCode Software Labs./Keziah Biermann "] description = "This crate provides a simple ASN.1-DER en-/decoder" license = "BSD-2-Clause OR MIT" @@ -26,7 +26,7 @@ overflow-checks = true [dependencies.asn1_der_derive] optional = true -version = "0.1.1" +version = "0.1.2" path = "./asn1_der_derive" diff --git a/src/der/length.rs b/src/der/length.rs index 0988860..06eeeb5 100644 --- a/src/der/length.rs +++ b/src/der/length.rs @@ -16,7 +16,7 @@ impl DerLength { pub fn deserialize<'a>(mut source: impl Iterator) -> Result { match *source.next().ok_or(Asn1DerError::LengthMismatch)? as usize { // Decode simple length - b @ 0...127 => Ok(Self{ len: b }), + b @ 0..=127 => Ok(Self{ len: b }), // Decode complex length b => match b & 0x0f { @@ -40,7 +40,7 @@ impl DerLength { pub fn serialized_len(&self) -> usize { match self.len { // Simple length - 0...127 => 1, + 0..=127 => 1, // Complex length len => 1 + USIZE_LEN - (len.leading_zeros() / 8) as usize } @@ -52,7 +52,7 @@ impl DerLength { let serialized_len = self.serialized_len(); match self.len { // Encode simple length - len @ 0...127 => *buf.next().ok_or(Asn1DerError::LengthMismatch)? = len as u8, + len @ 0..=127 => *buf.next().ok_or(Asn1DerError::LengthMismatch)? = len as u8, // Encode complex length len => {