Skip to content

Commit 4af2fc8

Browse files
committed
fixup! centralize index entry Stat creation/comparison
1 parent 2217a82 commit 4af2fc8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gix-index/tests/index/entry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ mod time {
55

66
#[test]
77
fn conversion_roundtrip() {
8-
for sample in [entry::Time::default(), entry::Time { secs: 42, nsecs: 150 }] {
8+
for sample in [entry::stat::Time::default(), entry::stat::Time { secs: 42, nsecs: 150 }] {
99
let other: SystemTime = sample.into();
10-
let new_sample: entry::Time = other.into();
10+
let new_sample: entry::stat::Time = other.try_into().unwrap();
1111
assert_eq!(
1212
new_sample, sample,
1313
"sample is still the same after conversion to system-time and back"

gix-index/tests/index/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn size_of_entry() {
2727
assert_eq!(std::mem::size_of::<gix_index::Entry>(), 80);
2828

2929
// the reason we have our own time is half the size.
30-
assert_eq!(std::mem::size_of::<gix_index::entry::Time>(), 8);
30+
assert_eq!(std::mem::size_of::<gix_index::entry::stat::Time>(), 8);
3131
assert_eq!(std::mem::size_of::<filetime::FileTime>(), 16);
3232
}
3333

0 commit comments

Comments
 (0)