Skip to content

Commit

Permalink
Fix clippy warning about eliding explicit lifetime
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
obbardc committed Jan 10, 2024
1 parent 13ff841 commit 851fbd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 } => {
Expand Down

0 comments on commit 851fbd5

Please sign in to comment.