diff --git a/src/assets.rs b/src/assets.rs index d32ccbd4..e6c50219 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -370,7 +370,7 @@ mod tests { pub temp_dir: TempDir, } - impl<'a> SyntaxDetectionTest<'a> { + impl SyntaxDetectionTest<'_> { fn new() -> Self { SyntaxDetectionTest { assets: HighlightingAssets::from_binary(), diff --git a/src/controller.rs b/src/controller.rs index ffc5dd5b..422b381e 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -25,7 +25,7 @@ pub struct Controller<'a> { preprocessor: Option, } -impl<'b> Controller<'b> { +impl Controller<'_> { pub fn new<'a>(config: &'a Config, assets: &'a HighlightingAssets) -> Controller<'a> { Controller { config, diff --git a/src/input.rs b/src/input.rs index 0ebaa4ce..b36204df 100644 --- a/src/input.rs +++ b/src/input.rs @@ -75,7 +75,7 @@ pub(crate) enum InputKind<'a> { CustomReader(Box), } -impl<'a> InputKind<'a> { +impl InputKind<'_> { pub fn description(&self) -> InputDescription { match self { InputKind::OrdinaryFile(ref path) => InputDescription::new(path.to_string_lossy()), diff --git a/src/printer.rs b/src/printer.rs index abc84464..2c364bd7 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -73,7 +73,7 @@ pub enum OutputHandle<'a> { FmtWrite(&'a mut dyn fmt::Write), } -impl<'a> OutputHandle<'a> { +impl OutputHandle<'_> { fn write_fmt(&mut self, args: fmt::Arguments<'_>) -> Result<()> { match self { Self::IoWrite(handle) => handle.write_fmt(args).map_err(Into::into), @@ -116,7 +116,7 @@ impl<'a> SimplePrinter<'a> { } } -impl<'a> Printer for SimplePrinter<'a> { +impl Printer for SimplePrinter<'_> { fn print_header( &mut self, _handle: &mut OutputHandle, @@ -448,7 +448,7 @@ impl<'a> InteractivePrinter<'a> { } } -impl<'a> Printer for InteractivePrinter<'a> { +impl Printer for InteractivePrinter<'_> { fn print_header( &mut self, handle: &mut OutputHandle, diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs index 306443e6..0cd2d655 100644 --- a/src/syntax_mapping.rs +++ b/src/syntax_mapping.rs @@ -61,7 +61,7 @@ pub struct SyntaxMapping<'a> { halt_glob_build: Arc, } -impl<'a> Drop for SyntaxMapping<'a> { +impl Drop for SyntaxMapping<'_> { fn drop(&mut self) { // signal the offload thread to halt early self.halt_glob_build.store(true, Ordering::Relaxed); diff --git a/src/vscreen.rs b/src/vscreen.rs index af082cef..06cc038a 100644 --- a/src/vscreen.rs +++ b/src/vscreen.rs @@ -539,7 +539,7 @@ impl<'a> EscapeSequenceOffsetsIterator<'a> { } } -impl<'a> Iterator for EscapeSequenceOffsetsIterator<'a> { +impl Iterator for EscapeSequenceOffsetsIterator<'_> { type Item = EscapeSequenceOffsets; fn next(&mut self) -> Option { match self.chars.peek() {