mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
Clean up linting warnings: replace usage of explicit lifetimes with elision.
Commands: cargo clippy --tests --no-deps --workspace Warnings: warning: the following explicit lifetimes could be elided: 'a --> database/src/fs.rs:348:6 | 348 | impl<'a> FilesystemTransaction<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 348 - impl<'a> FilesystemTransaction<'a> { 348 + impl FilesystemTransaction<'_> { | warning: the following explicit lifetimes could be elided: 'a --> database/src/sqlite.rs:141:6 | 141 | impl<'a> DatabaseTransaction<'a> for SqliteTransaction { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 141 - impl<'a> DatabaseTransaction<'a> for SqliteTransaction { 141 + impl DatabaseTransaction<'_> for SqliteTransaction { | warning: the following explicit lifetimes could be elided: 'a --> src/dump.rs:40:6 | 40 | impl<'a> std::fmt::Display for SessionKeyDisplay<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 40 - impl<'a> std::fmt::Display for SessionKeyDisplay<'a> { 40 + impl std::fmt::Display for SessionKeyDisplay<'_> { |
This commit is contained in:
@@ -345,7 +345,7 @@ pub struct FilesystemTransaction<'a> {
|
||||
_flock: FlockMutexGuard,
|
||||
}
|
||||
|
||||
impl<'a> FilesystemTransaction<'a> {
|
||||
impl FilesystemTransaction<'_> {
|
||||
fn link_email_vks(&self, email: &Email, fpr: &Fingerprint) -> Result<()> {
|
||||
let path = self.db.fingerprint_to_path_published(fpr);
|
||||
let link = self.db.link_by_email(email);
|
||||
|
@@ -138,7 +138,7 @@ fn query_simple<T: rusqlite::types::FromSql>(
|
||||
.expect("query exection must not fail")
|
||||
}
|
||||
|
||||
impl<'a> DatabaseTransaction<'a> for SqliteTransaction {
|
||||
impl DatabaseTransaction<'_> for SqliteTransaction {
|
||||
type TempCert = Vec<u8>;
|
||||
|
||||
fn commit(self) -> Result<()> {
|
||||
|
@@ -37,7 +37,7 @@ pub struct SessionKeyDisplay<'a> {
|
||||
}
|
||||
|
||||
/// Print the session key without prefix in hexadecimal representation.
|
||||
impl<'a> std::fmt::Display for SessionKeyDisplay<'a> {
|
||||
impl std::fmt::Display for SessionKeyDisplay<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
let sk = self.csk;
|
||||
write!(f, "{}", hex::encode(&sk.session_key))
|
||||
|
Reference in New Issue
Block a user