Skip to content

Commit 8a8bc06

Browse files
quextendani-garcia
andauthored
Update crates/bitwarden-crypto/src/signing/namespace.rs
Co-authored-by: Daniel García <[email protected]>
1 parent 444eb77 commit 8a8bc06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/bitwarden-crypto/src/signing/namespace.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ impl TryFrom<i128> for SigningNamespace {
4646
type Error = CryptoError;
4747

4848
fn try_from(value: i128) -> Result<Self, Self::Error> {
49-
if value < i64::MIN as i128 || value > i64::MAX as i128 {
49+
let Ok(value) = i64::try_from(value) else {
5050
return Err(SignatureError::InvalidNamespace.into());
51-
}
52-
Self::try_from(value as i64)
51+
};
52+
Self::try_from(value)
5353
}
5454
}

0 commit comments

Comments
 (0)