diff options
author | Azul <azul@riseup.net> | 2020-11-28 10:34:10 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-12-01 16:23:30 +0100 |
commit | 47dd56257e024aa813ed40bd1a207a9974d3207a (patch) | |
tree | eb33111bca9a773ac3049da42b465485d62c5948 /sqv | |
parent | 5c0cd1775fadc46e68a24a5af3d1f06803d69c4b (diff) |
openpgp: take ownership of Features bitfield
- Since `set_features` requires ownership of `Features`, it should take
ownership rather than borrowing and cloning them.
See https://rust-lang.github.io/api-guidelines/flexibility.html#caller-decides-where-to-copy-and-place-data-c-caller-control .
- See #616.
Diffstat (limited to 'sqv')
-rw-r--r-- | sqv/tests/revoked-key.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sqv/tests/revoked-key.rs b/sqv/tests/revoked-key.rs index fcc35f4f..13a224aa 100644 --- a/sqv/tests/revoked-key.rs +++ b/sqv/tests/revoked-key.rs @@ -314,7 +314,7 @@ fn create_key() { // 1st direct key signature valid from t1 on let mut b = signature::SignatureBuilder::new(SignatureType::DirectKey) - .set_features(&Features::sequoia()).unwrap() + .set_features(Features::sequoia()).unwrap() .set_key_flags(KeyFlags::empty() .set_signing().set_certification()).unwrap() .set_signature_creation_time(t1).unwrap() @@ -335,7 +335,7 @@ fn create_key() { // 2nd direct key signature valid from t3 on b = signature::SignatureBuilder::new(SignatureType::DirectKey) - .set_features(&Features::sequoia()).unwrap() + .set_features(Features::sequoia()).unwrap() .set_key_flags(KeyFlags::empty() .set_signing().set_certification()).unwrap() .set_signature_creation_time(t3).unwrap() |