From 1b15d6e6a44cd32d3622864ee6a77097a51df185 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 7 Oct 2024 00:14:29 +0200 Subject: [PATCH] Ignore needless_lifetimes clippy lint warning: the following explicit lifetimes could be elided: 'a --> tests/test_display.rs:152:14 | 152 | impl<'a> Display for Msg<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]` help: elide the lifetimes | 152 - impl<'a> Display for Msg<'a> { 152 + impl Display for Msg<'_> { | --- tests/test_display.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_display.rs b/tests/test_display.rs index 7a9057c..89bdc4a 100644 --- a/tests/test_display.rs +++ b/tests/test_display.rs @@ -1,4 +1,8 @@ -#![allow(clippy::needless_raw_string_hashes, clippy::uninlined_format_args)] +#![allow( + clippy::needless_lifetimes, + clippy::needless_raw_string_hashes, + clippy::uninlined_format_args +)] use core::fmt::{self, Display}; use thiserror::Error;