diff --git a/io-trait/src/metadata.rs b/io-trait/src/metadata.rs index 127c605..3b07d66 100644 --- a/io-trait/src/metadata.rs +++ b/io-trait/src/metadata.rs @@ -23,8 +23,11 @@ mod test { #[test] fn test() { + fn check_len(m: &impl Metadata, len: u64) { + assert_ne!(m.len(), len); + } let m = fs::metadata("Cargo.toml").unwrap(); - assert_ne!(Metadata::len(&m), 0); + check_len(&m, 0); assert_eq!(Metadata::is_dir(&m), false); } }