diff --git a/Cargo.toml b/Cargo.toml index 9a94fbc..fa70c1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ zeroize = { version = "1.8", features = ["derive"] } [workspace.lints.clippy] nursery = "warn" pedantic = "warn" -unwarp_used = "warn" +unwrap_used = "warn" # Defines a size-optimized profile for the WASM bundle in release mode [profile.wasm-release] diff --git a/aes/src/key/subkeys.rs b/aes/src/key/subkeys.rs index 789fbf7..e819a01 100644 --- a/aes/src/key/subkeys.rs +++ b/aes/src/key/subkeys.rs @@ -107,7 +107,7 @@ impl<'a> Iterator for SubkeyChunks<'a> { fn next(&mut self) -> Option { self.0 .next() - .map(|chunk| <&[Subkey; 4]>::try_from(chunk).unwrap()) + .map(|chunk| <&[Subkey; 4]>::try_from(chunk).expect("4 chunk subkeys")) } } @@ -118,7 +118,7 @@ impl<'a> Iterator for SubkeyChunksRev<'a> { fn next(&mut self) -> Option { self.0 .next() - .map(|chunk| <&[Subkey; 4]>::try_from(chunk).unwrap()) + .map(|chunk| <&[Subkey; 4]>::try_from(chunk).expect("4 chunk subkeys")) } } diff --git a/cipher-factory/src/context.rs b/cipher-factory/src/context.rs index e384d14..93822f6 100644 --- a/cipher-factory/src/context.rs +++ b/cipher-factory/src/context.rs @@ -29,6 +29,10 @@ impl CipherContext { } } + /// # Errors + /// + /// Returns `Err` if parsing the input text or creating the cipher fails, + /// or if the encryption/decryption process encounters an error. pub fn process(&self) -> CipherResult { let text_bytes = self.algorithm.parse_text(&self.input_text)?; let cipher = self.algorithm.new_cipher(&self.key)?; diff --git a/web/Cargo.toml b/web/Cargo.toml index 98eabb2..62cf2c2 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -34,8 +34,9 @@ ssr = [ "leptos_router/ssr", ] -[lints] -workspace = true +[lints.clippy] +nursery = "warn" +unwrap_used = "warn" # Defines a size-optimized profile for the WASM bundle in release mode [profile.wasm-release]