apply clippy suggestions
This commit is contained in:
13 files changed
+18
-22
No files matched your search
@@ -58,7 +58,6 @@ use crate::{RouterError, utils::use_router_internal::use_router_internal};
|
||||
/// # let _ = vdom.rebuild();
|
||||
/// # assert_eq!(dioxus_ssr::render(&vdom), "<h1>App</h1><p>Content</p>");
|
||||
/// ```
|
||||
#[must_use]
|
||||
pub fn use_navigate(cx: &ScopeState) -> Result<Navigator<ScopeId>, RouterError> {
|
||||
match use_router_internal(cx) {
|
||||
Some(r) => Ok(r.sender.clone().into()),
|
||||
|
||||
@@ -56,10 +56,7 @@ use crate::{utils::use_router_internal::use_router_internal, RouterError};
|
||||
/// ```
|
||||
///
|
||||
/// [`use_router`]: crate::hooks::use_router
|
||||
#[must_use]
|
||||
pub fn use_route<'a>(
|
||||
cx: &'a ScopeState,
|
||||
) -> Result<RwLockReadGuard<'a, RouterState<Component>>, RouterError> {
|
||||
pub fn use_route(cx: &ScopeState) -> Result<RwLockReadGuard<RouterState<Component>>, RouterError> {
|
||||
match use_router_internal(cx) {
|
||||
Some(r) => loop {
|
||||
if let Some(s) = r.state.try_read() {
|
||||
|
||||
@@ -192,7 +192,7 @@ impl Default for RouterConfiguration {
|
||||
failure_external_navigation: comp(FailureExternalNavigation),
|
||||
failure_named_navigation: comp(FailureNamedNavigation),
|
||||
failure_redirection_limit: comp(FailureRedirectionLimit),
|
||||
history: Box::new(MemoryHistory::default()),
|
||||
history: Box::<MemoryHistory>::default(),
|
||||
on_update: None,
|
||||
synchronous: false,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user