summaryrefslogtreecommitdiffstats
path: root/src/meta/inode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/meta/inode.rs')
-rw-r--r--src/meta/inode.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/meta/inode.rs b/src/meta/inode.rs
index bf30273..d40edf5 100644
--- a/src/meta/inode.rs
+++ b/src/meta/inode.rs
@@ -13,12 +13,12 @@ impl<'a> From<&'a Metadata> for INode {
let index = meta.ino();
- Self { index: index }
+ Self { index }
}
#[cfg(windows)]
fn from(_: &Metadata) -> Self {
- panic!("Cannot get inode on Windows")
+ Self { index: 0 }
}
}
@@ -29,6 +29,7 @@ impl INode {
}
#[cfg(test)]
+#[cfg(unix)]
mod tests {
use super::INode;
use std::env;
@@ -36,7 +37,6 @@ mod tests {
use std::path::Path;
use std::process::{Command, ExitStatus};
- #[cfg(unix)]
fn cross_platform_touch(path: &Path) -> io::Result<ExitStatus> {
Command::new("touch").arg(&path).status()
}