summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 20:06:33 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit694680ae3b2192c102f1b9a4d342677545cac629 (patch)
tree3fcdf4a32ce5f4cb6bda6d330f9b15a973c1d980 /openpgp
parent76f2e0ed8e30a0d1cde749f3444bd8a4c81bea87 (diff)
Lint: Remove redundant lifetime.
- Constants have by default a `'static` lifetime - https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/examples/generate-encrypt-decrypt.rs2
-rw-r--r--openpgp/examples/generate-sign-verify.rs2
-rw-r--r--openpgp/src/lib.rs2
-rw-r--r--openpgp/src/policy.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs
index 821dc63a..b16f6da4 100644
--- a/openpgp/examples/generate-encrypt-decrypt.rs
+++ b/openpgp/examples/generate-encrypt-decrypt.rs
@@ -12,7 +12,7 @@ use crate::openpgp::parse::{Parse, stream::*};
use crate::openpgp::policy::Policy;
use crate::openpgp::policy::StandardPolicy as P;
-const MESSAGE: &'static str = "дружба";
+const MESSAGE: &str = "дружба";
fn main() -> openpgp::Result<()> {
let p = &P::new();
diff --git a/openpgp/examples/generate-sign-verify.rs b/openpgp/examples/generate-sign-verify.rs
index 6242b623..3a7e89f2 100644
--- a/openpgp/examples/generate-sign-verify.rs
+++ b/openpgp/examples/generate-sign-verify.rs
@@ -10,7 +10,7 @@ use crate::openpgp::parse::{Parse, stream::*};
use crate::openpgp::policy::Policy;
use crate::openpgp::policy::StandardPolicy as P;
-const MESSAGE: &'static str = "дружба";
+const MESSAGE: &str = "дружба";
fn main() -> openpgp::Result<()> {
let p = &P::new();
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index 43b28657..ac4fbeed 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -178,7 +178,7 @@ fn frozen_time() -> std::time::SystemTime {
}
/// The version of this crate.
-pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
/// Crate result specialization.
pub type Result<T> = ::std::result::Result<T, anyhow::Error>;
diff --git a/openpgp/src/policy.rs b/openpgp/src/policy.rs
index ee006161..716750af 100644
--- a/openpgp/src/policy.rs
+++ b/openpgp/src/policy.rs
@@ -778,7 +778,7 @@ fn system_time_cutoff_to_timestamp(t: SystemTime) -> Option<Timestamp> {
impl<'a> StandardPolicy<'a> {
/// Instantiates a new `StandardPolicy` with the default parameters.
pub const fn new() -> Self {
- const EMPTY_LIST: &'static [&'static str] = &[];
+ const EMPTY_LIST: &[&str] = &[];
Self {
time: None,
collision_resistant_hash_algos: