We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2227d8b + 8911381 commit 97471a2Copy full SHA for 97471a2
src/lib.rs
@@ -833,6 +833,18 @@ mod test {
833
.or_insert_with(|| X(1, 0));
834
}
835
836
+ #[test]
837
+ fn test_duplicate_clean() {
838
+ let mut storage: Storage<u64, u64, X> = Storage::new();
839
+
840
+ storage.add(X(0, 0));
841
842
+ storage.entry(&ID.chunk(0).item(0));
843
+ storage.remove(&ID.chunk(0).item(0), std::mem::drop);
844
845
+ storage.validate();
846
+ }
847
848
#[test]
849
fn test_str() {
850
let mut storage: Storage<str, str, S> = Storage::new();
src/types/storage.rs
@@ -235,6 +235,7 @@ where
235
236
237
self.dirty.sort_unstable();
238
+ self.dirty.dedup();
239
240
for idx in self.dirty.iter().rev() {
241
if !self.chunks[*idx].is_empty() {
0 commit comments