aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src/mst.rs
diff options
context:
space:
mode:
Diffstat (limited to 'adenosine-pds/src/mst.rs')
-rw-r--r--adenosine-pds/src/mst.rs4
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;
}
}