Enable clippy

This commit is contained in:
Alexandre Kirszenberg committed 2022-01-08 16:35:26 +01:00
1 parent 4f1894ff5c
commit b6903bf558
14 files changed
+46 -50

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
id: format_args!("{}", cx.props.id.unwrap_or("")),
prevent_default: "onclick",
onclick: move |_| service.push_route(cx.props.to.clone()),
onclick: move |_| service.push_route(cx.props.to),
&cx.props.children
}
+2 -2
View File
@@ -27,8 +27,8 @@ pub fn Route<'a>(cx: Scope<'a, RouteProps<'a>>) -> Element {
cx.use_hook(|_| {
// create a bigger, better, longer route if one above us exists
let total_route = match cx.consume_context::<RouteContext>() {
Some(ctx) => format!("{}", ctx.total_route.clone()),
None => format!("{}", cx.props.to.clone()),
Some(ctx) => ctx.total_route.to_string(),
None => cx.props.to.to_string(),
};
// provide our route context