summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ffi-macros/src/rust2c.rs2
-rw-r--r--ipc/tests/gpg-agent.rs2
-rw-r--r--net/tests/hkp.rs6
-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
-rw-r--r--store/src/backend/mod.rs2
-rw-r--r--store/src/lib.rs4
9 files changed, 12 insertions, 12 deletions
diff --git a/ffi-macros/src/rust2c.rs b/ffi-macros/src/rust2c.rs
index 002c6199..8d1d26df 100644
--- a/ffi-macros/src/rust2c.rs
+++ b/ffi-macros/src/rust2c.rs
@@ -2,7 +2,7 @@ use syn;
use quote::ToTokens;
use proc_macro2;
-const PREFIX: &'static str = "pgp_";
+const PREFIX: &str = "pgp_";
/// Derives the C type from the Rust type.
///
diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs
index a2a6d286..5124a62e 100644
--- a/ipc/tests/gpg-agent.rs
+++ b/ipc/tests/gpg-agent.rs
@@ -62,7 +62,7 @@ async fn help() -> openpgp::Result<()> {
Ok(())
}
-const MESSAGE: &'static str = "дружба";
+const MESSAGE: &str = "дружба";
fn gpg_import(ctx: &Context, what: &[u8]) {
use std::process::{Command, Stdio};
diff --git a/net/tests/hkp.rs b/net/tests/hkp.rs
index f1984529..de248bb8 100644
--- a/net/tests/hkp.rs
+++ b/net/tests/hkp.rs
@@ -14,7 +14,7 @@ use sequoia_openpgp::parse::Parse;
use sequoia_net as net;
use sequoia_net::KeyServer;
-const RESPONSE: &'static str = "-----BEGIN PGP PUBLIC KEY BLOCK-----
+const RESPONSE: &str = "-----BEGIN PGP PUBLIC KEY BLOCK-----
xsBNBFoVcvoBCACykTKOJddF8SSUAfCDHk86cNTaYnjCoy72rMgWJsrMLnz/V16B
J9M7l6nrQ0JMnH2Du02A3w+kNb5q97IZ/M6NkqOOl7uqjyRGPV+XKwt0G5mN/ovg
@@ -46,8 +46,8 @@ Pu1xwz57O4zo1VYf6TqHJzVC3OMvMUM2hhdecMUe5x6GorNaj6g=
-----END PGP PUBLIC KEY BLOCK-----
";
-const FP: &'static str = "3E8877C877274692975189F5D03F6F865226FE8B";
-const ID: &'static str = "D03F6F865226FE8B";
+const FP: &str = "3E8877C877274692975189F5D03F6F865226FE8B";
+const ID: &str = "D03F6F865226FE8B";
async fn service(req: Request<Body>)
-> Result<Response<Body>, Box<dyn std::error::Error + Send + Sync>> {
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:
diff --git a/store/src/backend/mod.rs b/store/src/backend/mod.rs
index cbfe1f90..4197f43b 100644
--- a/store/src/backend/mod.rs
+++ b/store/src/backend/mod.rs
@@ -1327,7 +1327,7 @@ impl From<io::Error> for node::Error {
/* Database schemata and migrations. */
/* Version 1. */
-const DB_SCHEMA_1: &'static str = "
+const DB_SCHEMA_1: &str = "
CREATE TABLE version (
id INTEGER PRIMARY KEY,
version INTEGER);
diff --git a/store/src/lib.rs b/store/src/lib.rs
index 1de01573..cc2687de 100644
--- a/store/src/lib.rs
+++ b/store/src/lib.rs
@@ -110,11 +110,11 @@ pub fn descriptor(c: &Context) -> ipc::Descriptor {
}
/// Keys used for communications.
-pub const REALM_CONTACTS: &'static str =
+pub const REALM_CONTACTS: &str =
"org.sequoia-pgp.contacts";
/// Keys used for signing software updates.
-pub const REALM_SOFTWARE_UPDATES: &'static str =
+pub const REALM_SOFTWARE_UPDATES: &str =
"org.sequoia-pgp.software-updates";
/// The common key pool.