From 65e07b371442fd50f7147656a6739d107c3b839a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 4 Feb 2024 12:37:51 +0000 Subject: [PATCH] Remove some otiose lifetimes clippy complains about this (but we're going to suppress the lint, and maybe we want to keep them sometimes). --- src/coloured_string.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coloured_string.rs b/src/coloured_string.rs index 01221ca..3d90257 100644 --- a/src/coloured_string.rs +++ b/src/coloured_string.rs @@ -15,7 +15,7 @@ pub trait ColouredStringCommon { UnicodeWidthStr::width(self.text()) } - fn slice<'a>(&'a self) -> ColouredStringSlice<'a> { + fn slice(&self) -> ColouredStringSlice { ColouredStringSlice { text: self.text(), colours: self.colours(), @@ -26,21 +26,21 @@ pub trait ColouredStringCommon { self.split(width).next().unwrap() } - fn chars<'a>(&'a self) -> ColouredStringCharIterator<'a> { + fn chars(&self) -> ColouredStringCharIterator { ColouredStringCharIterator { cs: self.slice(), textpos: 0, colourpos: 0, } } - fn frags<'a>(&'a self) -> ColouredStringFragIterator<'a> { + fn frags(&self) -> ColouredStringFragIterator { ColouredStringFragIterator { cs: self.slice(), textpos: 0, colourpos: 0, } } - fn split<'a>(&'a self, width: usize) -> ColouredStringSplitIterator<'a> { + fn split(&self, width: usize) -> ColouredStringSplitIterator { ColouredStringSplitIterator { cs: self.slice(), width, -- 2.30.2