Skip to content
Snippets Groups Projects
Commit bb9d0e4a authored by stratact's avatar stratact
Browse files

Implement `RawFile::from_raw_fd()`

parent 285d1b05
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,10 @@ impl RawFile { ...@@ -25,6 +25,10 @@ impl RawFile {
pub fn into_raw_fd(self) -> usize { pub fn into_raw_fd(self) -> usize {
self.0 self.0
} }
pub fn from_raw_fd(fd: usize) -> Self {
RawFile(fd)
}
} }
impl Drop for RawFile { impl Drop for RawFile {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment