Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(volo-grpc): fix clippy rule needless_lifetimes #507

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

yukiiiteru
Copy link
Member

Motivation

error: the following explicit lifetimes could be elided: 'a
   --> volo-grpc/src/metadata/key.rs:207:6
    |
207 | impl<'a, VE: ValueEncoding> PartialEq<MetadataKey<VE>> for &'a MetadataKey<VE> {
    |      ^^                                                     ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
    |
207 - impl<'a, VE: ValueEncoding> PartialEq<MetadataKey<VE>> for &'a MetadataKey<VE> {
207 + impl<VE: ValueEncoding> PartialEq<MetadataKey<VE>> for &MetadataKey<VE> {
    |

Solution

Fix them

error: the following explicit lifetimes could be elided: 'a
   --> volo-grpc/src/metadata/key.rs:207:6
    |
207 | impl<'a, VE: ValueEncoding> PartialEq<MetadataKey<VE>> for &'a MetadataKey<VE> {
    |      ^^                                                     ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
    |
207 - impl<'a, VE: ValueEncoding> PartialEq<MetadataKey<VE>> for &'a MetadataKey<VE> {
207 + impl<VE: ValueEncoding> PartialEq<MetadataKey<VE>> for &MetadataKey<VE> {
    |

Signed-off-by: Yu Li <[email protected]>
@yukiiiteru yukiiiteru requested review from a team as code owners October 8, 2024 07:01
@yukiiiteru yukiiiteru merged commit dde1176 into cloudwego:main Oct 8, 2024
7 of 15 checks passed
@yukiiiteru yukiiiteru deleted the chore/clippy-fix branch October 8, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants