Skip to content
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

clippy: Fix last few warnings #32270

Merged
merged 4 commits into from
May 12, 2024
Merged

clippy: Fix last few warnings #32270

merged 4 commits into from
May 12, 2024

Conversation

Pi-Cla
Copy link
Contributor

@Pi-Cla Pi-Cla commented May 11, 2024


warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do (components/script/dom/htmlformelement.rs:896:20)

warning: `Box::new(_)` of default value (components/script/dom/paintworkletglobalscope.rs:291:29)

warning: this creates an owned instance just for comparison (components/script/dom/radionodelist.rs:105:50)
@Pi-Cla
Copy link
Contributor Author

Pi-Cla commented May 11, 2024

With this the only remaining clippy warnings we may care about are those that deal with unsafe code without a documented # Safety section so #32112 should be very possible now

warning: this `if` statement can be collapsed (components/layout_thread/lib.rs:876:17)

warning: the following explicit lifetimes could be elided: 'a (components/layout_thread/lib.rs:239 and 2020 same line)

warning: deref which would be done by auto-deref (components/layout_thread/lib.rs:500 and 1289)

warning: dereferencing a tuple pattern where every element takes a reference (components/layout_thread/lib.rs:503,1562 and 2020 line 1153)

warning: useless conversion to the same type: `style::invalidation::element::restyle_hints::RestyleHint` (components/layout_thread_2020/lib.rs:742:36)
warning: constants have by default a `'static` lifetime (components/servo/lib.rs:1238:31)

warning: creating a `let` binding to a value of unit type, which usually
can't be used afterwards (5 occurances in components/servo/lib.rs)
warning: this expression creates a reference which is immediately dereferenced by the compiler (ports/servoshell/app.rs:251:89)

warning: using `clone` on type `Option<TopLevelBrowsingContextId>` which implements the `Copy` trait (ports/servoshell/webview.rs:122:9)
@sagudev sagudev added this pull request to the merge queue May 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 12, 2024
@sagudev sagudev added this pull request to the merge queue May 12, 2024
Merged via the queue into servo:main with commit 3d4fd0e May 12, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants