diff options
author | Andrew Gallant <jamslam@gmail.com> | 2020-01-11 21:31:13 +0300 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-01-11 21:31:49 +0300 |
commit | c584a1d56c5f4b64019e1a4d70c5355e3212cc9b (patch) | |
tree | cfdd16307a87215dddf88a8c78fd96e7ca6b14fb /src/util.rs | |
parent | dc7499a6c6667f469437b10e0549352652407e60 (diff) |
style: switch to rustfmt
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.rs b/src/util.rs index 4aa0afc..b9fcad8 100644 --- a/src/util.rs +++ b/src/util.rs @@ -2,22 +2,22 @@ use std::io; use std::path::Path; #[cfg(unix)] -pub fn device_num<P: AsRef<Path>>(path: P)-> io::Result<u64> { +pub fn device_num<P: AsRef<Path>>(path: P) -> io::Result<u64> { use std::os::unix::fs::MetadataExt; path.as_ref().metadata().map(|md| md.dev()) } - #[cfg(windows)] +#[cfg(windows)] pub fn device_num<P: AsRef<Path>>(path: P) -> io::Result<u64> { - use winapi_util::{Handle, file}; + use winapi_util::{file, Handle}; let h = Handle::from_path_any(path)?; file::information(h).map(|info| info.volume_serial_number()) } #[cfg(not(any(unix, windows)))] -pub fn device_num<P: AsRef<Path>>(_: P)-> io::Result<u64> { +pub fn device_num<P: AsRef<Path>>(_: P) -> io::Result<u64> { Err(io::Error::new( io::ErrorKind::Other, "walkdir: same_file_system option not supported on this platform", |