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 /openpgp/src/types/mod.rs | |
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 'openpgp/src/types/mod.rs')
-rw-r--r-- | openpgp/src/types/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs index 5872ebb4..4fd25e50 100644 --- a/openpgp/src/types/mod.rs +++ b/openpgp/src/types/mod.rs @@ -691,7 +691,7 @@ impl Arbitrary for SymmetricAlgorithm { /// # fn main() -> openpgp::Result<()> { /// let features = Features::empty().set_aead(); /// let mut builder = SignatureBuilder::new(SignatureType::DirectKey) -/// .set_features(&features)? +/// .set_features(features)? /// .set_preferred_aead_algorithms(vec![ /// AEADAlgorithm::EAX, /// ])?; |