From 375143f8f67db773fbf4bab5143c2f0e2dbc1a2f Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 12 Jun 2024 10:49:36 +0800 Subject: [PATCH] fix: fix Rust v1.78.0 clippy warnings --- src/eyreish/error.rs | 2 +- src/eyreish/mod.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/eyreish/error.rs b/src/eyreish/error.rs index 677f368..2ecab03 100644 --- a/src/eyreish/error.rs +++ b/src/eyreish/error.rs @@ -410,7 +410,7 @@ impl Report { } /// Provide source code for this error - pub fn with_source_code(self, source_code: impl SourceCode + Send + Sync + 'static) -> Report { + pub fn with_source_code(self, source_code: impl SourceCode + 'static) -> Report { WithSourceCode { source_code, error: self, diff --git a/src/eyreish/mod.rs b/src/eyreish/mod.rs index 544c240..acc2ea3 100644 --- a/src/eyreish/mod.rs +++ b/src/eyreish/mod.rs @@ -57,7 +57,7 @@ pub struct Report { unsafe impl Sync for Report {} unsafe impl Send for Report {} -/// +#[allow(missing_docs)] pub type ErrorHook = Box Box + Sync + Send + 'static>; @@ -109,7 +109,7 @@ fn get_default_printer(_err: &(dyn Diagnostic + 'static)) -> Box(&self) -> bool { // Get `TypeId` of the type this function is instantiated with. let t = core::any::TypeId::of::(); @@ -121,7 +121,7 @@ impl dyn ReportHandler { t == concrete } - /// + #[allow(missing_docs)] pub fn downcast_ref(&self) -> Option<&T> { if self.is::() { unsafe { Some(&*(self as *const dyn ReportHandler as *const T)) } @@ -130,7 +130,7 @@ impl dyn ReportHandler { } } - /// + #[allow(missing_docs)] pub fn downcast_mut(&mut self) -> Option<&mut T> { if self.is::() { unsafe { Some(&mut *(self as *mut dyn ReportHandler as *mut T)) }