diff --git a/packages/core/src/error_boundary.rs b/packages/core/src/error_boundary.rs index f107fa723..034c02c91 100644 --- a/packages/core/src/error_boundary.rs +++ b/packages/core/src/error_boundary.rs @@ -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, } @@ -90,7 +91,7 @@ impl Error for CapturedError {} impl CapturedError { /// Downcast the error type into a concrete error type pub fn downcast(&self) -> Option<&T> { - if TypeId::of::() == self.error.type_id() { + if TypeId::of::() == (*self.error).type_id() { self.error.as_any().downcast_ref::() } else { None diff --git a/packages/desktop/src/assets.rs b/packages/desktop/src/assets.rs index fa26c06ef..906c78f72 100644 --- a/packages/desktop/src/assets.rs +++ b/packages/desktop/src/assets.rs @@ -3,7 +3,7 @@ use rustc_hash::FxHashMap; use std::{cell::RefCell, rc::Rc}; use wry::{http::Request, RequestAsyncResponder}; -/// +/// A request for an asset within dioxus-desktop. pub type AssetRequest = Request>; pub struct AssetHandler { diff --git a/packages/hooks/src/use_root_context.rs b/packages/hooks/src/use_root_context.rs index 61367225b..7187645ea 100644 --- a/packages/hooks/src/use_root_context.rs +++ b/packages/hooks/src/use_root_context.rs @@ -1,6 +1,6 @@ use dioxus_core::{prelude::provide_root_context, prelude::try_consume_context, use_hook}; -/// +/// Try to get a value from the root of the virtual dom, if it doesn't exist, create a new one with the closure provided. pub fn use_root_context(new: impl FnOnce() -> T) -> T { use_hook(|| { try_consume_context::()