diff options
author | arcnmx <arcnmx@users.noreply.github.com> | 2016-01-25 21:57:17 -0500 |
---|---|---|
committer | Kamal Marhubi <kamal@marhubi.com> | 2016-01-28 00:44:44 -0500 |
commit | 136bb454d98a9032843259e71f12d8e33cd90f27 (patch) | |
tree | 942872a1bad2de7b3417f248dda6d70b8ac01d54 /src/sys/quota.rs | |
parent | 01e841679633b459470120a305ff22dd12138422 (diff) | |
download | nix-136bb454d98a9032843259e71f12d8e33cd90f27.zip |
Errno::result()
Diffstat (limited to 'src/sys/quota.rs')
-rw-r--r-- | src/sys/quota.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sys/quota.rs b/src/sys/quota.rs index 4786f80d..7a7718e4 100644 --- a/src/sys/quota.rs +++ b/src/sys/quota.rs @@ -1,5 +1,5 @@ -use {Result, NixPath, from_ffi}; -use errno::Errno; +use NixPath; +use errno::{Errno, Result}; use libc::{c_int, c_char}; #[cfg(all(target_os = "linux", @@ -90,7 +90,8 @@ fn quotactl<P: ?Sized + NixPath>(cmd: quota::QuotaCmd, special: Option<&P>, id: None => Ok(ffi::quotactl(cmd.as_int(), ptr::null(), id, addr)), } ); - from_ffi(res) + + Errno::result(res).map(drop) } } |