We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f59b6e9 commit 0181a72Copy full SHA for 0181a72
tools/ckb-sphincs-tools/src/utils.rs
@@ -70,7 +70,7 @@ fn char_to_u8(c: char) -> u8 {
70
pub fn str_to_bytes(input: &str) -> Vec<u8> {
71
let off = if input.contains("0x") { 2 } else { 0 };
72
let input = input.as_bytes();
73
- assert!(input.len() % 2 == 0);
+ assert!(input.len().is_multiple_of(2));
74
let mut r = vec![0; (input.len() - off) / 2];
75
76
for i in 0..r.len() {
0 commit comments