From 47dd56257e024aa813ed40bd1a207a9974d3207a Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 28 Nov 2020 10:34:10 +0100 Subject: 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. --- openpgp/src/types/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openpgp/src/types/mod.rs') 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, /// ])?; -- cgit v1.2.3