Skip to content

Conversation

@alyssais
Copy link
Contributor

@alyssais alyssais commented Jul 30, 2025

Summary of the PR

It was already possible to do this as follows:

unsafe { Listener::from_raw_fd(listener.into_raw_fd()) }

This just factors the From implementation out of the FromRawFd implementation so it's possible to do the conversion without an unnecessary unsafe in application code.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test. (Covered by the existing test for FromRawFd.)
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

It was already possible to do this as follows:

	unsafe { Listener::from_raw_fd(listener.into_raw_fd()) }

This just factors the From implementation out of the FromRawFd
implementation so it's possible to do the conversion without an
unnecessary unsafe in application code.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
@epilys epilys enabled auto-merge (rebase) July 30, 2025 08:56
@epilys epilys merged commit c2dafc7 into rust-vmm:main Jul 30, 2025
31 checks passed
@alyssais alyssais deleted the from branch September 9, 2025 14:30
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