diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-02-20 23:06:16 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-02-20 23:06:16 +0100 |
commit | 779ca624bfbf9181bfab15df8bd479f33060d170 (patch) | |
tree | d85f4995baa52d651af865f80e825a35fafbd360 | |
parent | 3ef8c539f55876e2aef8c9e70fe7e1ff755a5959 (diff) |
openpgp: Fix lifetime.
-rw-r--r-- | openpgp/src/cert/amalgamation.rs | 4 | ||||
-rw-r--r-- | openpgp/src/cert/mod.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs index 8c368f98..bbb9b030 100644 --- a/openpgp/src/cert/amalgamation.rs +++ b/openpgp/src/cert/amalgamation.rs @@ -195,7 +195,7 @@ impl<'a, C> ValidComponentAmalgamation<'a, C> } /// Represents a component. -pub trait Amalgamation<'a, C> { +pub trait Amalgamation<'a, C: 'a> { /// The type returned by `with_policy`. type V; @@ -215,7 +215,7 @@ pub trait Amalgamation<'a, C> { } /// Represents a component under a given policy. -pub trait ValidAmalgamation<'a, C> : Amalgamation<'a, C>{ +pub trait ValidAmalgamation<'a, C: 'a> : Amalgamation<'a, C> { /// Returns the amalgamation's reference time. /// /// For queries that are with respect to a point in time, this diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs index b640b8b5..65113950 100644 --- a/openpgp/src/cert/mod.rs +++ b/openpgp/src/cert/mod.rs @@ -253,7 +253,7 @@ type UnknownBindings = ComponentBundles<Unknown>; /// on self signatures can be used to express preferences for /// algorithms and key management. Furthermore, the key holder's /// OpenPGP implementation can express its feature set. -pub trait Preferences<'a, C>: components::ValidAmalgamation<'a, C> { +pub trait Preferences<'a, C: 'a>: components::ValidAmalgamation<'a, C> { /// Returns symmetric algorithms that the key holder prefers. /// /// The algorithms are ordered according by the key holder's |