New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid clippy::let-underscore-drop #2952
Conversation
Correct me if I'm wrong: Is this because clippy thinks If my assumption is correct, then perhaps instead of working around the mechanism by which clippy lints this (binding to |
The following main.rs replicates the clippy warning: ``` use yew::prelude::*; struct Props { droppable: Vec<()>, } fn component(props: &Props) -> Html { let props = Props { droppable: Vec::new() }; html! { <Component ..props /> } } fn main() {} ``` If I'm not mistaken this happens when using the `..` on any `Properties` with a field that implements `Drop`.
b7a682f
to
80f3a44
Compare
Yes, you're right. That works just as well. 👌 |
Visit the preview URL for this PR (updated for commit 80f3a44): https://yew-rs-api--pr2952-let-underscore-drop-g54b08uq.web.app (expires Tue, 15 Nov 2022 15:13:56 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Benchmark - SSRYew Master
Pull Request
|
Size Comparison
✅ None of the examples has changed their size significantly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Description
The following main.rs replicates the clippy warning:
If I'm not mistaken this happens when using the
..
on anyProperties
with a field that implementsDrop
.Checklist