From 7b1a204066b4e88faeb20a8fd4e4bef69b6eb112 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 1 May 2025 09:25:01 -0700 Subject: [PATCH] Clippy fixes --- Cargo.lock | 4 ++-- color-eyre/src/config.rs | 2 +- color-eyre/src/writers.rs | 2 +- eyre/src/ptr.rs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 45d4183..1919f29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,7 +116,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "color-eyre" -version = "0.6.2" +version = "0.6.3" dependencies = [ "ansi-parser", "backtrace", @@ -136,7 +136,7 @@ dependencies = [ [[package]] name = "color-spantrace" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ansi-parser", "once_cell", diff --git a/color-eyre/src/config.rs b/color-eyre/src/config.rs index f8f19b4..6523831 100644 --- a/color-eyre/src/config.rs +++ b/color-eyre/src/config.rs @@ -160,7 +160,7 @@ pub struct Frame { #[derive(Debug)] struct StyledFrame<'a>(&'a Frame, Theme); -impl<'a> fmt::Display for StyledFrame<'a> { +impl fmt::Display for StyledFrame<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let Self(frame, theme) = self; diff --git a/color-eyre/src/writers.rs b/color-eyre/src/writers.rs index ce828af..31e3b30 100644 --- a/color-eyre/src/writers.rs +++ b/color-eyre/src/writers.rs @@ -67,7 +67,7 @@ impl<'a, H: ?Sized, W> HeaderWriter<'a, H, W> { } } -impl<'a, H: ?Sized, W> fmt::Write for ReadyHeaderWriter<'a, '_, H, W> +impl fmt::Write for ReadyHeaderWriter<'_, '_, H, W> where H: Display, W: fmt::Write, diff --git a/eyre/src/ptr.rs b/eyre/src/ptr.rs index 3d118e5..81d325d 100644 --- a/eyre/src/ptr.rs +++ b/eyre/src/ptr.rs @@ -75,8 +75,8 @@ pub(crate) struct RefPtr<'a, T: ?Sized> { unsafe impl<'a, T: ?Sized> Send for RefPtr<'a, T> where &'a T: Send {} unsafe impl<'a, T: ?Sized> Sync for RefPtr<'a, T> where &'a T: Sync {} -impl<'a, T: ?Sized> Copy for RefPtr<'a, T> {} -impl<'a, T: ?Sized> Clone for RefPtr<'a, T> { +impl Copy for RefPtr<'_, T> {} +impl Clone for RefPtr<'_, T> { fn clone(&self) -> Self { *self } @@ -121,8 +121,8 @@ pub(crate) struct MutPtr<'a, T: ?Sized> { unsafe impl<'a, T: ?Sized> Send for MutPtr<'a, T> where &'a mut T: Send {} unsafe impl<'a, T: ?Sized> Sync for MutPtr<'a, T> where &'a mut T: Sync {} -impl<'a, T: ?Sized> Copy for MutPtr<'a, T> {} -impl<'a, T: ?Sized> Clone for MutPtr<'a, T> { +impl Copy for MutPtr<'_, T> {} +impl Clone for MutPtr<'_, T> { fn clone(&self) -> Self { *self }