mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-20 05:16:35 +00:00
Fix some rustc/clippy warnings. (#895)
This commit is contained in:
@ -549,7 +549,7 @@ where
|
||||
let (encoding_cipher, encoding_hmac) = {
|
||||
let (iv, rest) = local_infos.split_at(iv_size);
|
||||
let (cipher_key, mac_key) = rest.split_at(cipher_key_size);
|
||||
let hmac = Hmac::from_key(context.state.remote.chosen_hash.into(), mac_key);
|
||||
let hmac = Hmac::from_key(context.state.remote.chosen_hash, mac_key);
|
||||
let cipher = ctr(chosen_cipher, cipher_key, iv);
|
||||
(cipher, hmac)
|
||||
};
|
||||
@ -557,7 +557,7 @@ where
|
||||
let (decoding_cipher, decoding_hmac) = {
|
||||
let (iv, rest) = remote_infos.split_at(iv_size);
|
||||
let (cipher_key, mac_key) = rest.split_at(cipher_key_size);
|
||||
let hmac = Hmac::from_key(context.state.remote.chosen_hash.into(), mac_key);
|
||||
let hmac = Hmac::from_key(context.state.remote.chosen_hash, mac_key);
|
||||
let cipher = ctr(chosen_cipher, cipher_key, iv);
|
||||
(cipher, hmac)
|
||||
};
|
||||
|
Reference in New Issue
Block a user