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

Commit

Permalink
Remove redundant field names
Browse files Browse the repository at this point in the history
Now we have edition 2018 clippy emits warning:

  warning: redundant field names in struct initialization

As suggested, remove the redundant field names.
  • Loading branch information
tcharding committed Jan 15, 2022
1 parent d0dab4c commit 0a82176
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/hmac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ impl<T: Hash> HmacEngine<T> {
/// "inner" and "outer" engines.
pub fn from_inner_engines(iengine: T::Engine, oengine: T::Engine) -> HmacEngine<T> {
HmacEngine {
iengine: iengine,
oengine: oengine,
iengine,
oengine,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl HashEngine {
HashEngine {
buffer: [0; BLOCK_SIZE],
h: ret,
length: length,
length,
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/siphash24.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ impl HashEngine {
/// Create a new SipHash24 engine with keys.
pub fn with_keys(k0: u64, k1: u64) -> HashEngine {
HashEngine {
k0: k0,
k1: k1,
k0,
k1,
length: 0,
state: State {
v0: k0 ^ 0x736f6d6570736575,
Expand Down

0 comments on commit 0a82176

Please sign in to comment.