diff options
Diffstat (limited to 'third_party/rust/same-file/examples/is_same_file.rs')
-rw-r--r-- | third_party/rust/same-file/examples/is_same_file.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/rust/same-file/examples/is_same_file.rs b/third_party/rust/same-file/examples/is_same_file.rs new file mode 100644 index 0000000000..6ba948a4c8 --- /dev/null +++ b/third_party/rust/same-file/examples/is_same_file.rs @@ -0,0 +1,11 @@ +use same_file::is_same_file; +use std::io; + +fn try_main() -> Result<(), io::Error> { + assert!(is_same_file("/bin/sh", "/usr/bin/sh")?); + Ok(()) +} + +fn main() { + try_main().unwrap(); +} |