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 some warnings in components/script
#31735
Conversation
components/script/dom/identityhub.rs
Outdated
impl Default for Identities { | ||
fn default() -> Self { |
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.
You also need to update all references to Identities::new()
to be Identities::default()
if you change the name of the method.
Does this build locally? Before putting the "x" in the box that says " ./mach build -d does not report any errors" please actually run |
I apologize sir I thought I did run the build for this PR I’ll fix it right away |
@mrobinson Please review this again |
@@ -114,8 +114,8 @@ impl MediaFragmentParser { | |||
} | |||
} else { | |||
let mut iterator = fragment.split(','); | |||
let start = parse_hms(iterator.next().ok_or_else(|| ())?)?; | |||
let end = parse_hms(iterator.next().ok_or_else(|| ())?)?; | |||
let start = parse_hms(iterator.next().ok_or(()))?; |
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 think the build error you are having originates here, since it expects an &str
but it is receiving a Result
. One way to solve it would be adding back the second ?
, as it will unwrap the Result
type. You can probably also get rid of the ok_or(())
operator since ?
should also work for Option
types and we are not using the error type. This goes for lines 117, 118, 317, 318, 322 and 333.
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.
Yeah I fixed all 6 of them already… I’m trying to build it before pushing to be sure there no more errors Thanks @eerii
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.
The PR is ready to go now
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.
A member from the servo team will have to approve the pr but all the changes are looking good to me, thanks!
components/script
.
components/script
.components/script
./mach build -d
does not report any errors./mach test-tidy
does not report any errors