sys: deprecate BorrowedFd

std has this now, stable since 1.63

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-10-19 10:55:03 +02:00
parent b039bf011b
commit 85c260f6b5

View File

@ -8,6 +8,7 @@ use std::os::unix::io::{AsRawFd, RawFd};
/// This specifically does not implement `IntoRawFd` or `FromRawFd`, since those would drop life
/// times.
#[derive(Debug, Eq, PartialEq)]
#[deprecated(note = "use std::os::unix::io::BorrowedFd instead")]
pub struct BorrowedFd<'a> {
fd: RawFd,
_borrow: PhantomData<&'a RawFd>,