From de6f09a01ccb96bd87d86697a4453f4643ed1984 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 1 Aug 2022 09:34:35 +0200 Subject: [PATCH] Remove unused lifetime --- .vscode/settings.json | 3 ++- src/utils.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7649dc6..b952ef1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "rust-analyzer.cargo.allFeatures": true, - "rust-analyzer.assist.importMergeBehavior": "last" + "rust-analyzer.assist.importMergeBehavior": "last", + "rust-analyzer.checkOnSave.command": "clippy" } \ No newline at end of file diff --git a/src/utils.rs b/src/utils.rs index 1f8fdc9..44776fe 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -37,7 +37,7 @@ struct SliceRemapper<'x, T: ?Sized> { indexes: Vec>, } -impl<'x, 'slices, T: DiffableStr + ?Sized> SliceRemapper<'x, T> { +impl<'x, T: DiffableStr + ?Sized> SliceRemapper<'x, T> { fn new(source: &'x T, slices: &[&'x T]) -> SliceRemapper<'x, T> { let indexes = slices .iter() @@ -99,7 +99,7 @@ pub struct TextDiffRemapper<'x, T: ?Sized> { new: SliceRemapper<'x, T>, } -impl<'x, 'slices, T: DiffableStr + ?Sized> TextDiffRemapper<'x, T> { +impl<'x, T: DiffableStr + ?Sized> TextDiffRemapper<'x, T> { /// Creates a new remapper from strings and slices. pub fn new( old_slices: &[&'x T],