fix empty docs clippy warning

This commit is contained in:
Evan Almloff committed 2024-05-03 13:41:48 -05:00
1 parent 010dcf9533
commit 05eaca320f
3 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -17,6 +17,7 @@ use std::{
///
/// NOTE: WASM currently does not support caching unwinds, so this struct will not be created in WASM.
pub struct CapturedPanic {
#[allow(dead_code)]
/// The error that was caught
pub error: Box<dyn Any + 'static>,
}
@@ -90,7 +91,7 @@ impl Error for CapturedError {}
impl CapturedError {
/// Downcast the error type into a concrete error type
pub fn downcast<T: 'static>(&self) -> Option<&T> {
if TypeId::of::<T>() == self.error.type_id() {
if TypeId::of::<T>() == (*self.error).type_id() {
self.error.as_any().downcast_ref::<T>()
} else {
None