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 I/O-safe traits #84

Merged
merged 6 commits into from Aug 17, 2022
Merged

Implement I/O-safe traits #84

merged 6 commits into from Aug 17, 2022

Conversation

notgull
Copy link
Member

@notgull notgull commented Aug 11, 2022

This PR implements AsFd and AsSocket for Async<T>. In addition, TryFrom<OwnedFd/OwnedSocket is implemented for Async<T> and TryFrom<Async<T>> is implemented for OwnedFd/OwnedSocket, in order to mirror the From/Into<OwnedFd/OwnedSocket> impls in std but also considering that the operations are fallible in async-io.

See also: sunfishcode/io-lifetimes#38

Copy link
Collaborator

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good to me.

Cargo.toml Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e taiki-e merged commit a20076f into smol-rs:master Aug 17, 2022
@taiki-e
Copy link
Collaborator

taiki-e commented Aug 17, 2022

Published in 1.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants