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

{Root,Handle}::from_fd_unchecked -> from_fd #88

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

cyphar
Copy link
Member

@cyphar cyphar commented Oct 10, 2024

It seems incredibly unlikely that we will ever add verification to
Handle::from_fd / Root::from_fd, so having the _unchecked suffix doesn't
really make sense.

Fixes #85
Signed-off-by: Aleksa Sarai [email protected]

It seems incredibly unlikely that we will ever add verification to
Handle::from_fd / Root::from_fd, so having the _unchecked suffix doesn't
really make sense.

Signed-off-by: Aleksa Sarai <[email protected]>
We still need {Root,Handle}::from_fd because you can't do something like

  impl From<Into<OwnedFd>> for ...

and being able to do Root::from_fd(<File>) is quite nice, so we need
both methods. But at least now you could do <File>.into() if that's what
you're into.

Signed-off-by: Aleksa Sarai <[email protected]>
@cyphar cyphar added this to the 0.2.0 milestone Oct 10, 2024
@cyphar cyphar merged commit 34de9d3 into openSUSE:main Oct 10, 2024
35 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.

rust api: switch from from_fd_unchecked() to From<...>?
1 participant