mirror of
https://github.com/kristoferssolo/cipher-workshop.git
synced 2025-12-20 11:04:38 +00:00
fix: clippy warnings
This commit is contained in:
parent
b81b87e6db
commit
f1a0ab75c3
@ -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]
|
||||
|
||||
@ -107,7 +107,7 @@ impl<'a> Iterator for SubkeyChunks<'a> {
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
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::Item> {
|
||||
self.0
|
||||
.next()
|
||||
.map(|chunk| <&[Subkey; 4]>::try_from(chunk).unwrap())
|
||||
.map(|chunk| <&[Subkey; 4]>::try_from(chunk).expect("4 chunk subkeys"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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<String> {
|
||||
let text_bytes = self.algorithm.parse_text(&self.input_text)?;
|
||||
let cipher = self.algorithm.new_cipher(&self.key)?;
|
||||
|
||||
@ -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]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user