Merge branch 'crypto-improvements' into new-state-store

master
Damir Jelić 2021-01-02 13:49:20 +01:00
commit 807c58649d
2 changed files with 4 additions and 8 deletions

View File

@ -621,9 +621,9 @@ mod test {
fn proptest_decimals(bytes in prop::array::uniform5(0u8..)) { fn proptest_decimals(bytes in prop::array::uniform5(0u8..)) {
let (first, second, third) = bytes_to_decimal(bytes.to_vec()); let (first, second, third) = bytes_to_decimal(bytes.to_vec());
prop_assert!(first <= 9191 && first >= 1000); prop_assert!((1000..=9191).contains(&first));
prop_assert!(second <= 9191 && second >= 1000); prop_assert!((1000..=9191).contains(&second));
prop_assert!(third <= 9191 && third >= 1000); prop_assert!((1000..=9191).contains(&third));
} }
} }
} }

View File

@ -302,11 +302,7 @@ impl InnerSas {
} }
pub fn can_be_presented(&self) -> bool { pub fn can_be_presented(&self) -> bool {
match self { matches!(self, InnerSas::KeyRecieved(_) | InnerSas::MacReceived(_))
InnerSas::KeyRecieved(_) => true,
InnerSas::MacReceived(_) => true,
_ => false,
}
} }
pub fn is_done(&self) -> bool { pub fn is_done(&self) -> bool {