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

Implement Clone and Default for WeakLoopHandle manually #219

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

Paraworker
Copy link
Contributor

@Paraworker Paraworker commented Jan 12, 2025

I suddenly realized this...

The derived Clone/Default implementation adds Clone/Default bound on the generic parameter Data.

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.28%. Comparing base (ba9ed53) to head (1bab16d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
+ Coverage   85.54%   86.28%   +0.74%     
==========================================
  Files          13       15       +2     
  Lines        1888     2078     +190     
==========================================
+ Hits         1615     1793     +178     
- Misses        273      285      +12     
Flag Coverage Δ
macos-latest 85.57% <ø> (?)
ubuntu-latest 85.88% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -332,6 +332,15 @@ impl<Data> Debug for WeakLoopHandle<'_, Data> {
}
}

impl<Data> Clone for WeakLoopHandle<'_, Data> {
Copy link
Member

Choose a reason for hiding this comment

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

Might be good to add a comment mentioning why it isn't just derived.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comments added, also changed Default to manual.

The derived `Clone`/`Default` implementation adds `Clone`/`Default` bound on the generic parameter `Data`.
@Paraworker Paraworker changed the title Implement Clone for WeakLoopHandle manually Implement Clone and Default for WeakLoopHandle manually Jan 12, 2025
@notgull notgull merged commit 8225b69 into Smithay:master Jan 13, 2025
14 checks passed
@Paraworker Paraworker deleted the manual-debug-impl branch January 13, 2025 00:13
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