apply suggestions: Vec to slice, if let to match, comments

This commit is contained in:
Fabian Kaczmarczyck
2020-03-12 16:10:31 +01:00
parent 8d52e8aad7
commit db6be4efac
2 changed files with 27 additions and 28 deletions

View File

@@ -224,8 +224,8 @@ impl From<Extensions> for cbor::Value {
fn from(extensions: Extensions) -> Self {
cbor_map_btree!(extensions
.0
.iter()
.map(|(key, value)| (cbor_text!(key), value.clone()))
.into_iter()
.map(|(key, value)| (cbor_text!(key), value))
.collect())
}
}
@@ -1095,7 +1095,7 @@ mod test {
);
let credential = PublicKeyCredentialSource {
cred_random: Some([0x00; 32].to_vec()),
cred_random: Some(vec![0x00; 32]),
..credential
};