-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fixed some clippy warnings in components #32025
Conversation
Hello @mrobinson |
@mrobinson , a lot of the warnings talk about the use of unsafe code, should we use |
components/script/dom/range.rs
Outdated
let remove_from_node = | ||
!(!move_start || !move_end && node_is_end) || move_end && !node_is_start; |
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.
Hrm...I think this new formulation is more difficult to understand. In this case, I would add an exception for the clippy warning or rewrite the logic to be more understandable.
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.
I absolutely agree with you @mrobinson ...I picked this straight from the clippy suggestion and felt it was more complicated but thought it was the standard. I checked that it evaluated to the same as the before and applied it.
Let me find another way for this sir.
Thank you.
components/script/dom/range.rs
Outdated
let remove_from_node = | ||
!(!move_start || !move_end && node_is_end) || move_end && !node_is_start; |
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.
I feel the same way about this new code.
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.
Let me work on it sir
I have updated the PR @mrobinson , kindly review again. |
Hmm something seems to not be going fine sir @mrobinson . ->They are running with no errors. |
Sir would you recommend this? |
Adding |
This PR fixes some clippy warnings by;
./mach build -d
does not report any errors./mach test-tidy
does not report any errors