diff options
author | Kamal Marhubi <kamal@marhubi.com> | 2017-02-27 22:55:49 -0500 |
---|---|---|
committer | Kamal Marhubi <kamal@marhubi.com> | 2017-02-28 00:48:06 -0500 |
commit | 33f8f3c12f4baf36d53b4a3e0efd99ee85c00125 (patch) | |
tree | 4722446507afef3a2fb283d16db1ec6c31a4c493 /src/fcntl.rs | |
parent | c47f664f891ab569bac9bc470c21b77aaeb91604 (diff) | |
download | nix-33f8f3c12f4baf36d53b4a3e0efd99ee85c00125.zip |
fcntl: Expose FcntlArg variants at the module level
This allows importing them directly from `nix::fcntl` which is more
ergonomic than needing to use them via `FcntlArg`.
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r-- | src/fcntl.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index 64e9fb60..e224d3b1 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -55,11 +55,10 @@ pub enum FcntlArg<'a> { // TODO: Rest of flags } +pub use self::FcntlArg::*; // TODO: Figure out how to handle value fcntl returns pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> { - use self::FcntlArg::*; - let res = unsafe { match arg { F_DUPFD(rawfd) => libc::fcntl(fd, libc::F_DUPFD, rawfd), |