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 unnecessary_cast warnings in components/script #31823

Merged
merged 5 commits into from Mar 22, 2024

Conversation

oluwatobiss
Copy link
Contributor

@oluwatobiss oluwatobiss commented Mar 22, 2024

Remove unnecessary casts to the same type to fix the unnecessary_cast warnings.

ref: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes are part of Fix as many clippy problems as possible #31500
  • These changes do not require tests because they only resolve clippy warnings. They do not change functionalities.

@@ -703,7 +703,7 @@ pub fn get_reports(cx: *mut RawJSContext, path_seg: String) -> Vec<Report> {
reports.push(Report {
path,
kind,
size: size as usize,
size: size,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
size: size,
size,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks.

@mrobinson mrobinson added this pull request to the merge queue Mar 22, 2024
Merged via the queue into servo:main with commit bae7767 Mar 22, 2024
9 checks passed
@oluwatobiss oluwatobiss deleted the fix/unnecessary-cast-errors branch March 26, 2024 16:19
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