diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-21 10:23:04 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:00 +0300 |
commit | e6a335b93a10620bcb7cbfa32e232949758f0c99 (patch) | |
tree | 834bfcb8f3ddb7564bc352f90f3c000fe5bf62ce /ipc | |
parent | e917221b626b816d79af95eded8154065100cdf1 (diff) |
Drop unnecessary lifetime notations
Rust can automatically deduce lifetimes in some cases ("lifetime
elision"). While adding unnecessary lifetime annotations is not
incorrect, it can make it harder to follow the code: why is there a
lifetime annotation here? What is the reason why it's needed? Is
something unusual going on.
This removes a few unnecessary lifetime annotations, as found by the
clippy lint needless_lifetimes:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/src/assuan/mod.rs | 2 | ||||
-rw-r--r-- | ipc/src/gnupg.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ipc/src/assuan/mod.rs b/ipc/src/assuan/mod.rs index 9f7ab824..5a4d9f20 100644 --- a/ipc/src/assuan/mod.rs +++ b/ipc/src/assuan/mod.rs @@ -138,7 +138,7 @@ impl Client { /// using this objects [`Stream`] implementation. /// /// [`Stream`]: #impl-Stream - pub fn cancel<'a>(&'a mut self) -> Result<()> { + pub fn cancel(&mut self) -> Result<()> { self.send("CAN") } diff --git a/ipc/src/gnupg.rs b/ipc/src/gnupg.rs index f008d012..68906829 100644 --- a/ipc/src/gnupg.rs +++ b/ipc/src/gnupg.rs @@ -324,7 +324,7 @@ impl Agent { /// Note: This function does not try to start the server. If no /// server is running for the given context, this operation will /// fail. - pub async fn connect<'c>(ctx: &'c Context) -> Result<Self> { + pub async fn connect(ctx: &Context) -> Result<Self> { let path = ctx.socket("agent")?; Self::connect_to(path).await } |