apply clippy suggestions
This commit is contained in:
13 files changed
+18
-22
No files matched your search
@@ -4,7 +4,7 @@ use dioxus_router_core::prelude::{named, FailureExternalNavigation as FENName, R
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn FailureExternalNavigation(cx: Scope) -> Element {
|
||||
let state = use_route(&cx).expect(
|
||||
let state = use_route(cx).expect(
|
||||
"`FailureExternalNavigation` can only be mounted by the router itself, \
|
||||
since it is not exposed",
|
||||
);
|
||||
|
||||
@@ -56,7 +56,7 @@ pub fn GoBackButton<'a>(cx: Scope<'a, HistoryButtonProps<'a>>) -> Element {
|
||||
let HistoryButtonProps { children } = cx.props;
|
||||
|
||||
// hook up to router
|
||||
let router = match use_router_internal(&cx) {
|
||||
let router = match use_router_internal(cx) {
|
||||
Some(r) => r,
|
||||
#[allow(unreachable_code)]
|
||||
None => {
|
||||
@@ -131,7 +131,7 @@ pub fn GoForwardButton<'a>(cx: Scope<'a, HistoryButtonProps<'a>>) -> Element {
|
||||
let HistoryButtonProps { children } = cx.props;
|
||||
|
||||
// hook up to router
|
||||
let router = match use_router_internal(&cx) {
|
||||
let router = match use_router_internal(cx) {
|
||||
Some(r) => r,
|
||||
#[allow(unreachable_code)]
|
||||
None => {
|
||||
|
||||
@@ -114,7 +114,7 @@ pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
|
||||
} = cx.props;
|
||||
|
||||
// hook up to router
|
||||
let router = match use_router_internal(&cx) {
|
||||
let router = match use_router_internal(cx) {
|
||||
Some(r) => r,
|
||||
#[allow(unreachable_code)]
|
||||
None => {
|
||||
|
||||
@@ -69,7 +69,7 @@ pub fn Outlet(cx: Scope<OutletProps>) -> Element {
|
||||
let OutletProps { depth, name } = cx.props;
|
||||
|
||||
// hook up to router
|
||||
let router = match use_router_internal(&cx) {
|
||||
let router = match use_router_internal(cx) {
|
||||
Some(r) => r,
|
||||
#[allow(unreachable_code)]
|
||||
None => {
|
||||
|
||||
Reference in new issue
Block a user