refactor: redundant field names in struct initialization

This commit is contained in:
k-nasa 2019-04-05 11:38:47 +09:00
parent 309c480782
commit 1dc8cf6ad5
3 changed files with 4 additions and 4 deletions

View File

@ -68,8 +68,8 @@ impl Key {
encryption_key.copy_from_slice(&both_keys[SIGNED_KEY_LEN..]);
Key {
signing_key: signing_key,
encryption_key: encryption_key,
signing_key,
encryption_key,
}
}

View File

@ -37,7 +37,7 @@ impl<'a> PrivateJar<'a> {
let mut key_array = [0u8; KEY_LEN];
key_array.copy_from_slice(key.encryption());
PrivateJar {
parent: parent,
parent,
key: key_array,
}
}

View File

@ -31,7 +31,7 @@ impl<'a> SignedJar<'a> {
#[doc(hidden)]
pub fn new(parent: &'a mut CookieJar, key: &Key) -> SignedJar<'a> {
SignedJar {
parent: parent,
parent,
key: SigningKey::new(HMAC_DIGEST, key.signing()),
}
}