From bb9d0e4aa1d74be17b6e8d2fdc0c5b6723e32c04 Mon Sep 17 00:00:00 2001
From: stratact <stratact1@gmail.com>
Date: Wed, 23 May 2018 13:14:25 -0700
Subject: [PATCH] Implement `RawFile::from_raw_fd()`

---
 src/platform/src/rawfile.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/platform/src/rawfile.rs b/src/platform/src/rawfile.rs
index d1de83cd..feb69cd6 100644
--- a/src/platform/src/rawfile.rs
+++ b/src/platform/src/rawfile.rs
@@ -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 {
-- 
GitLab