[yew-devel] [PATCH yew-widget-toolkit-examples 3/3] mobile2: remove needless borrows
Shannon Sterz
s.sterz at proxmox.com
Mon Jan 13 14:29:36 CET 2025
this fixes the clippy lint `needless_borrow` [1].
[1]:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
mobile2/src/main.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mobile2/src/main.rs b/mobile2/src/main.rs
index cf44a2b..5abff6c 100644
--- a/mobile2/src/main.rs
+++ b/mobile2/src/main.rs
@@ -43,7 +43,7 @@ enum Route {
}
fn switch(path: &str) -> Vec<Html> {
- let route = Route::recognize(&path).unwrap_or_default();
+ let route = Route::recognize(path).unwrap_or_default();
match route {
Route::Home | Route::HomeAlias => vec![html! {<Home/>}],
Route::Settings => vec![html! {<Settings/>}],
@@ -51,7 +51,7 @@ fn switch(path: &str) -> Vec<Html> {
html! {<Settings/>},
// fixme: we cannot use Switch here, because that render NotFound during page stack transitions
// html! { <Switch<SubSettings> render={switch_subsettings} />},
- SubSettings::switch(SubSettings::recognize(&path).unwrap_or_default()),
+ SubSettings::switch(SubSettings::recognize(path).unwrap_or_default()),
],
Route::Favorite => vec![html! {<Favorite/>}],
Route::Profile => vec![html! {<Profile/>}],
--
2.39.5
More information about the yew-devel
mailing list