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

Drop ArcFdGuard newtype #230

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

WhyNotHugo
Copy link
Contributor

This type existed because AsRawFd was not implemented for Arc<T> where T: AsRawFd.

As for 1.63.0, the following implementation is provided:

impl<T: AsRawFd> AsRawFd for Arc<T>

The current MSRV is 1.70, so we can rely on this new implementation.

Drop the newtype wrapper, and rely on the new stdlib implementation instead.

@WhyNotHugo
Copy link
Contributor Author

I have a follow-up for this which replaces FdGuard with OwnedFd: ad90da8

Copy link
Owner

@hannobraun hannobraun left a comment

Choose a reason for hiding this comment

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

Thank you, @WhyNotHugo! Looks good!

This type existed because AsRawFd was not implemented for `Arc<T> where
T: AsRawFd`.

As for 1.63.0, the following implementation is provided:

    impl<T: AsRawFd> AsRawFd for Arc<T>

The current MSRV is 1.70, so we can rely on this new implementation.

Drop the newtype wrapper, and rely on the new stdlib implementation
instead.
@hannobraun hannobraun enabled auto-merge January 14, 2025 18:07
@hannobraun hannobraun merged commit a9ac573 into hannobraun:main Jan 14, 2025
4 checks passed
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.

2 participants