From 4b513bad73bc1218b086364738e5472a70acb1fa Mon Sep 17 00:00:00 2001 From: Michael Zimmermann Date: Wed, 20 Jan 2021 19:04:40 +0100 Subject: [PATCH] fix clippy::needless_lifetimes warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) --> tarpc/src/rpc/server/filter.rs:127:5 | 127 | fn channel<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut C> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::needless_lifetimes)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes warning: 1 warning emitted --- tarpc/src/rpc/server/filter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarpc/src/rpc/server/filter.rs b/tarpc/src/rpc/server/filter.rs index 5aafee8..8e5d257 100644 --- a/tarpc/src/rpc/server/filter.rs +++ b/tarpc/src/rpc/server/filter.rs @@ -124,7 +124,7 @@ impl TrackedChannel { } /// Returns the pinned inner channel. - fn channel<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut C> { + fn channel(self: Pin<&mut Self>) -> Pin<&mut C> { self.project().inner } }