Skip to content

Commit

Permalink
Make suggestions made by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
brimworks committed Mar 6, 2023
1 parent db154e1 commit c8f26cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions picky-asn1/src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ impls! { IntegerAsn1(VecU8), Tag::INTEGER }
fn minimal_encode_start(bytes: &[u8]) -> usize {
let mut start = 0;
while start + 1 < bytes.len() {
if bytes[start] == 0 && (bytes[start + 1] & 0x80) == 0 {
start = start + 1;
} else if bytes[start] == 0xFF && (bytes[start + 1] & 0x80) == 0x80 {
start = start + 1;
if bytes[start] == 0 && (bytes[start + 1] & 0x80) == 0
|| bytes[start] == 0xFF && (bytes[start + 1] & 0x80) == 0x80
{
start += 1;
} else {
break;
}
Expand Down

0 comments on commit c8f26cf

Please sign in to comment.