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/statvfs.rs | |
parent | 5a3ac8df3fa2de86477d961d8b5720b1d283b2d5 (diff) | |
download | nix-ca035734df2e3dfeb866cbfee51de7b582be83f5.zip |
Replace try! with ?
try! is not available in Rust 2018
Diffstat (limited to 'src/sys/statvfs.rs')
-rw-r--r-- | src/sys/statvfs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sys/statvfs.rs b/src/sys/statvfs.rs index 845ae0db..de69ae51 100644 --- a/src/sys/statvfs.rs +++ b/src/sys/statvfs.rs @@ -126,9 +126,9 @@ pub fn statvfs<P: ?Sized + NixPath>(path: &P) -> Result<Statvfs> { unsafe { Errno::clear(); let mut stat: Statvfs = mem::uninitialized(); - let res = try!( - path.with_nix_path(|path| libc::statvfs(path.as_ptr(), &mut stat.0)) - ); + let res = path.with_nix_path(|path| + libc::statvfs(path.as_ptr(), &mut stat.0) + )?; Errno::result(res).map(|_| stat) } |