Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit d63557f

Browse files
committed
Remove redundant slicing
Clippy emits: warning: redundant slicing of the whole range As suggested use `key` directly instead of the slice.
1 parent c85dd7d commit d63557f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hmac.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ impl<T: HashTrait> HmacEngine<T> {
8585
*b_o ^= *b_h;
8686
}
8787
} else {
88-
for (b_i, b_h) in ipad.iter_mut().zip(&key[..]) {
88+
for (b_i, b_h) in ipad.iter_mut().zip(key) {
8989
*b_i ^= *b_h;
9090
}
91-
for (b_o, b_h) in opad.iter_mut().zip(&key[..]) {
91+
for (b_o, b_h) in opad.iter_mut().zip(key) {
9292
*b_o ^= *b_h;
9393
}
9494
};

0 commit comments

Comments
 (0)