io safety: convert RawFd to AsFd types
Luap99 opened this issue · comments
see https://rust-lang.github.io/rfcs/3128-io-safety.html for reasons
nix now accepts AsFd types so we can use the over the RawFd type, the current code is fine at the moment but easy to misuse because we can drop the file and still have the RawFd somewhere which would lead to weird bugs.
yeah, this is also blocking the nix upgrade. for nix, we need to call out several features and once that is done, this is the next issue.