activation: Implement From<FileDescriptor> for OwnedFd#166
activation: Implement From<FileDescriptor> for OwnedFd#166cgwalters wants to merge 1 commit intolucab:masterfrom
Conversation
I think this crate predates I/O safety in std, but now that `OwnedFd` is part of std we can use it. I want to have most of my crates use `#[forbid(unsafe_code)]` and this helps. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
|
Hey Colin 👋 There are two broader topics related to the safety of these methods though:
If we tie the two things together, I think the conclusion is that this library has no way of correctly producing a single-owned |
To be clear I'm trying to avoid
Right, this is discussed in rust-lang/rust#116059 - it's not just systemd but also wayland and the venerable jobserver protocol. |
|
Digging in see also swick/listen-fds-rs#1 which especially links to rust-lang/libs-team#623 which is about the creation side. |
I think this crate predates I/O safety in std, but now that
OwnedFdis part of std we can use it.I want to have most of my crates use
#[forbid(unsafe_code)]and this helps.Assisted-by: OpenCode (claude-opus-4-6)