diff options
author | Alan Somers <asomers@gmail.com> | 2018-12-08 13:47:33 -0700 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2018-12-08 13:51:43 -0700 |
commit | ca035734df2e3dfeb866cbfee51de7b582be83f5 (patch) | |
tree | dbbf94ee5189b13ea4d448ba63512b43f85b4ba8 /src/sys/statfs.rs | |
parent | 5a3ac8df3fa2de86477d961d8b5720b1d283b2d5 (diff) | |
download | nix-ca035734df2e3dfeb866cbfee51de7b582be83f5.zip |
Replace try! with ?
try! is not available in Rust 2018
Diffstat (limited to 'src/sys/statfs.rs')
-rw-r--r-- | src/sys/statfs.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index 6d4fafe9..e7ffae5e 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -6,9 +6,7 @@ use libc; pub fn statfs<P: ?Sized + NixPath>(path: &P, stat: &mut libc::statfs) -> Result<()> { unsafe { Errno::clear(); - let res = try!( - path.with_nix_path(|path| libc::statfs(path.as_ptr(), stat)) - ); + let res = path.with_nix_path(|path| libc::statfs(path.as_ptr(), stat))?; Errno::result(res).map(drop) } |