Skip to content

Conversation

@camsteffen
Copy link
Contributor

Tracking issue

Group the fields into a single ManuallyDrop with an inner struct. This simplifies/reduces the unsafe code.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 1, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 1, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor

tgross35 commented Oct 1, 2025

I'm a bit behind on my reviews,
r? libs

@rustbot rustbot assigned ibraheemdev and unassigned tgross35 Oct 1, 2025
@camsteffen camsteffen force-pushed the refactor-drop-guard branch from b397f2e to fff1d8d Compare October 1, 2025 19:17
@camsteffen camsteffen force-pushed the refactor-drop-guard branch from fff1d8d to 2a1c764 Compare October 1, 2025 20:55
Copy link
Member

@joboet joboet left a comment

Choose a reason for hiding this comment

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

I'm not a big fan of this – the reduction of unsafe blocks is rather small, and this might lead to into_inner not optimising well since f isn't dropped in place.

View changes since this review

Comment on lines -89 to -90
// First we ensure that dropping the guard will not trigger
// its destructor
Copy link
Member

Choose a reason for hiding this comment

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

This comment seems valuable, I wouldn't remove it.

@joboet joboet assigned joboet and unassigned ibraheemdev Oct 2, 2025
@camsteffen
Copy link
Contributor Author

Okay, I'll close this.

@camsteffen camsteffen closed this Oct 2, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants