diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-22 11:31:06 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-22 11:31:06 -0800 |
commit | f1b80f13f9408db9f76410c717d67d4f9cf7ed2a (patch) | |
tree | 78e19b2422f82a8b040e68e50758f4f6299a67fb /adenosine-pds/src/mst.rs | |
parent | 4fd86c1b2191aaaabc2b8a6ec5fc1078d75a28b5 (diff) | |
download | adenosine-f1b80f13f9408db9f76410c717d67d4f9cf7ed2a.tar.gz adenosine-f1b80f13f9408db9f76410c717d67d4f9cf7ed2a.zip |
clippy cleanups
Diffstat (limited to 'adenosine-pds/src/mst.rs')
-rw-r--r-- | adenosine-pds/src/mst.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adenosine-pds/src/mst.rs b/adenosine-pds/src/mst.rs index 969f584..9c4fe69 100644 --- a/adenosine-pds/src/mst.rs +++ b/adenosine-pds/src/mst.rs @@ -162,8 +162,8 @@ pub fn collect_mst_keys( fn leading_zeros(key: &str) -> u8 { let digest = sha256::digest(key); let digest = digest.as_bytes(); - for i in 0..digest.len() { - if digest[i] != b'0' { + for (i, c) in digest.iter().enumerate() { + if *c != b'0' { return i as u8; } } |