Skip to content

Replace manual Default impls with #[derive(Default)]#4517

Merged
HalidOdat merged 2 commits intoboa-dev:mainfrom
linkmauve:fix-clippy
Nov 17, 2025
Merged

Replace manual Default impls with #[derive(Default)]#4517
HalidOdat merged 2 commits intoboa-dev:mainfrom
linkmauve:fix-clippy

Conversation

@linkmauve
Copy link
Contributor

This Pull Request fixes/closes no issue.

It changes the following:

  • Remove an unneeded .to_string().
  • Replace a bunch of manual impl Defaults with #[derive(Default)]
  • Make explicit the failure mode of a Duration subtraction.

@jedel1043
Copy link
Member

This was already fixed by #4513

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Test262 conformance changes

Test result main count PR count difference
Total 50,747 50,747 0
Passed 47,877 47,877 0
Ignored 2,060 2,060 0
Failed 810 810 0
Panics 0 0 0
Conformance 94.34% 94.34% 0.00%

@linkmauve
Copy link
Contributor Author

I’ve rebased on top of main, there are still changes worth it in this PR, since I’m running clippy nightly locally.

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.96%. Comparing base (6ddc2b4) to head (e78d0dc).
⚠️ Report is 601 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4517      +/-   ##
==========================================
+ Coverage   47.24%   56.96%   +9.72%     
==========================================
  Files         476      503      +27     
  Lines       46892    57506   +10614     
==========================================
+ Hits        22154    32759   +10605     
- Misses      24738    24747       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

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

Besides the comment below, this looks good to me! @linkmauve
😄

Thanks to the #[default] tag we can avoid a bunch of such manual derives
on enums.
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

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

Looks good to me! 😄

@HalidOdat HalidOdat changed the title Fix clippy lints Replace manual Default impls with #[derive(Default)] Nov 17, 2025
@HalidOdat HalidOdat added this pull request to the merge queue Nov 17, 2025
Merged via the queue into boa-dev:main with commit 84bdcc3 Nov 17, 2025
18 checks passed
@linkmauve linkmauve deleted the fix-clippy branch November 17, 2025 19:26
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.

3 participants