Skip to content

Commit dd62274

Browse files
committed
chore: clippy
1 parent 342a6fa commit dd62274

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/keyfile.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ pub fn decrypt_keyfile_data(
400400
"Invalid nonce."
401401
))?;
402402
let ciphertext = &data[secretbox::NONCEBYTES..];
403-
Ok(secretbox::open(ciphertext, &nonce, key).map_err(|_| PyErr::new::<KeyFileError, _>("Wrong password for nacl decryption."))?)
403+
secretbox::open(ciphertext, &nonce, key).map_err(|_| PyErr::new::<KeyFileError, _>("Wrong password for nacl decryption."))
404404
}
405405

406406
// decrypt of keyfile_data with legacy way
@@ -412,7 +412,7 @@ pub fn decrypt_keyfile_data(
412412
let fernet_key = Fernet::generate_key();
413413
let fernet = Fernet::new(&fernet_key).unwrap();
414414
let keyfile_data_str = from_utf8(keyfile_data)?;
415-
Ok(fernet.decrypt(keyfile_data_str).map_err(|_| PyErr::new::<KeyFileError, _>("Wrong password for nacl decryption."))?)
415+
fernet.decrypt(keyfile_data_str).map_err(|_| PyErr::new::<KeyFileError, _>("Wrong password for nacl decryption."))
416416
}
417417

418418
let mut password = password;

src/wallet.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ except argparse.ArgumentError:
152152
pass"#, prefix_str, default_name, default_hotkey, default_path);
153153

154154
py
155-
.run_bound(&*code, Some(&[("parser", parser)].into_py_dict_bound(py)), None)
155+
.run_bound(&code, Some(&[("parser", parser)].into_py_dict_bound(py)), None)
156156
.expect("Python parser parse failed.");
157157
Ok(parser.to_object(py))
158158
}

0 commit comments

Comments
 (0)