summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/tests/gpg-agent.rs2
-rw-r--r--openpgp-ffi/src/policy.rs4
-rw-r--r--openpgp/examples/generate-encrypt-decrypt.rs2
-rw-r--r--openpgp/src/parse/stream.rs4
4 files changed, 6 insertions, 6 deletions
diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs
index e8a69d92..909307e1 100644
--- a/ipc/tests/gpg-agent.rs
+++ b/ipc/tests/gpg-agent.rs
@@ -254,7 +254,7 @@ fn decrypt() {
assert_eq!(MESSAGE.as_bytes(), &sink[..]);
struct Helper<'a> {
- policy: &'a Policy,
+ policy: &'a dyn Policy,
ctx: &'a Context,
cert: &'a openpgp::Cert,
}
diff --git a/openpgp-ffi/src/policy.rs b/openpgp-ffi/src/policy.rs
index 2c00ae52..dec5dfa0 100644
--- a/openpgp-ffi/src/policy.rs
+++ b/openpgp-ffi/src/policy.rs
@@ -18,7 +18,7 @@ use self::openpgp::policy;
#[crate::ffi_wrapper_type(
prefix = "pgp_",
derive = "Clone, Debug")]
-pub struct Policy(Box<policy::Policy>);
+pub struct Policy(Box<dyn policy::Policy>);
/// A StandardPolicy object.
#[crate::ffi_wrapper_type(
@@ -31,6 +31,6 @@ pub struct StandardPolicy(policy::StandardPolicy);
pub extern "C" fn pgp_standard_policy()
-> *mut Policy
{
- let p : Box<policy::Policy> = Box::new(policy::StandardPolicy::new());
+ let p : Box<dyn policy::Policy> = Box::new(policy::StandardPolicy::new());
p.move_into_raw()
}
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs
index 8258aaf4..089ed8e7 100644
--- a/openpgp/examples/generate-encrypt-decrypt.rs
+++ b/openpgp/examples/generate-encrypt-decrypt.rs
@@ -99,7 +99,7 @@ fn decrypt(p: &dyn Policy,
struct Helper<'a> {
secret: &'a openpgp::Cert,
- policy: &'a Policy,
+ policy: &'a dyn Policy,
}
impl<'a> VerificationHelper for Helper<'a> {
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index 08717d7b..a1931c15 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -543,7 +543,7 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> {
///
/// Signature verifications are done relative to time `t`, or the
/// current time, if `t` is `None`.
- pub fn from_reader<R, T>(policy: &'a Policy, reader: R, helper: H, t: T)
+ pub fn from_reader<R, T>(policy: &'a dyn Policy, reader: R, helper: H, t: T)
-> Result<Verifier<'a, H>>
where R: io::Read + 'a, T: Into<Option<time::SystemTime>>
{
@@ -560,7 +560,7 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> {
///
/// Signature verifications are done relative to time `t`, or the
/// current time, if `t` is `None`.
- pub fn from_file<P, T>(policy: &'a Policy, path: P, helper: H, t: T)
+ pub fn from_file<P, T>(policy: &'a dyn Policy, path: P, helper: H, t: T)
-> Result<Verifier<'a, H>>
where P: AsRef<Path>,
T: Into<Option<time::SystemTime>>