From 851fbd56a3145218f73930aaa08314f0ffb1fccc Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Wed, 10 Jan 2024 09:25:58 +0000 Subject: [PATCH] Fix clippy warning about eliding explicit lifetime Clippy produces a warning: warning: the following explicit lifetimes could be elided: 'a --> src/main.rs:351:17 | 351 | fn get_data<'a>(&'a self) -> Self::Data<'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 | 351 - fn get_data<'a>(&'a self) -> Self::Data<'a> { 351 + fn get_data(&self) -> Self::Data<'_> { | Fix the warning by following the advice from clippy. Signed-off-by: Christopher Obbard --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index cc13484..961d4e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -348,7 +348,7 @@ impl UploadableFile for LavaUploadableFile { } } - fn get_data<'a>(&'a self) -> Self::Data<'a> { + fn get_data(&self) -> Self::Data<'_> { outputln!("Uploading {}", self.get_path()); match &self.which { LavaUploadableFileType::Log { id } => {