From: Shannon Sterz <s.sterz@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-widget-toolkit-examples 3/3] mobile2: remove needless borrows
Date: Mon, 13 Jan 2025 14:29:36 +0100 [thread overview]
Message-ID: <20250113132936.258190-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20250113132936.258190-1-s.sterz@proxmox.com>
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@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
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
next prev parent reply other threads:[~2025-01-13 13:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 13:29 [yew-devel] [PATCH yew-widget-toolkit-examples 1/3] demo: run rustfmt Shannon Sterz
2025-01-13 13:29 ` [yew-devel] [PATCH yew-widget-toolkit-examples 2/3] demo: apply auto-appliable clippy fixes Shannon Sterz
2025-01-13 13:29 ` Shannon Sterz [this message]
2025-01-14 10:19 ` [yew-devel] applied: [PATCH yew-widget-toolkit-examples 1/3] demo: run rustfmt Dietmar Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250113132936.258190-3-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=yew-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.