Skip to content
Snippets Groups Projects
Commit 3d6b29bc authored by Éloïs's avatar Éloïs
Browse files

[fix] crypto: remove all unwrap() and deny it

parent fd53556f
No related branches found
No related tags found
No related merge requests found
...@@ -52,8 +52,8 @@ pub fn str_hex_to_32bytes(text: &str) -> Result<[u8; 32], BaseConvertionError> { ...@@ -52,8 +52,8 @@ pub fn str_hex_to_32bytes(text: &str) -> Result<[u8; 32], BaseConvertionError> {
}); });
} }
let byte1 = byte1.unwrap() as u8; let byte1 = byte1.unwrap_or_else(|| panic!(dbg!("dev error"))) as u8;
let byte2 = byte2.unwrap() as u8; let byte2 = byte2.unwrap_or_else(|| panic!(dbg!("dev error"))) as u8;
let byte = (byte1 << 4) | byte2; let byte = (byte1 << 4) | byte2;
bytes[i / 2] = byte; bytes[i / 2] = byte;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
//! Manage cryptographic operations for the DUP (DUniter Protocol). //! Manage cryptographic operations for the DUP (DUniter Protocol).
#![deny(clippy::option_unwrap_used, clippy::result_unwrap_used)]
#![deny( #![deny(
missing_docs, missing_docs,
missing_debug_implementations, missing_debug_implementations,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment