apply clippy suggestions

This commit is contained in:
Adrian Wannenmacher committed 2022-12-13 16:19:40 +01:00
1 parent 83f6984b0a
commit 4677a00adc
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 => {
+1 -1
View File
@@ -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 => {
+1 -1
View File
@@ -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 => {