Skip to content

Commit b22f846

Browse files
committed
chore(ls): add assertion for ancestor count
Tests for the resource leak without major refactorings.
1 parent 4156c74 commit b22f846

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/uu/ls/src/ls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,7 @@ pub fn list_with_output<O: LsOutput>(
12531253
&mut entries,
12541254
)?;
12551255
listed_ancestors.remove(&inode);
1256+
debug_assert!(listed_ancestors.is_empty());
12561257
}
12571258

12581259
output.finalize(config)?;

0 commit comments

Comments
 (0)