You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Clippy over my code, it said something about this function:
--> src\controllers\home.rs:4:1
|
4 | #[get("/")]
| ^^^^^^^^^^^ help: consider taking a reference instead: `&#[get("/")]`
|
= note: #[warn(needless_pass_by_value)] on by default
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_pass_by_value
I have this Rust function (the
get
attribute andTemplate
come from the web framework Rocket):When running Clippy over my code, it said something about this function:
Alright, so I did what Clippy told me:
However, the compiler wasn't too happy with that:
Is it a bug in Clippy that it suggests me to write this line? Or is it a problem from Rocket, or just my misunderstanding?
The text was updated successfully, but these errors were encountered: