Implement RawFile::from_raw_fd()

This commit is contained in:
stratact
2018-05-23 13:14:25 -07:00
parent 285d1b05c4
commit bb9d0e4aa1
+4
View File
@@ -25,6 +25,10 @@ impl RawFile {
pub fn into_raw_fd(self) -> usize {
self.0
}
pub fn from_raw_fd(fd: usize) -> Self {
RawFile(fd)
}
}
impl Drop for RawFile {