diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-03 04:44:40 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-03 04:44:40 +0200 |
commit | 7b7990635029776e8878f3b04ed7ca48192899a3 (patch) | |
tree | 36d87f483b89c55153c59a68d7b1720f67fa3941 /src/db/test.rs | |
parent | 6ebb54cddb3ac21f7384720b8336995a8889d20d (diff) | |
download | garage-7b7990635029776e8878f3b04ed7ca48192899a3.tar.gz garage-7b7990635029776e8878f3b04ed7ca48192899a3.zip |
Drop later
Diffstat (limited to 'src/db/test.rs')
-rw-r--r-- | src/db/test.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/db/test.rs b/src/db/test.rs index 20ebd54b..78d755cf 100644 --- a/src/db/test.rs +++ b/src/db/test.rs @@ -43,6 +43,7 @@ fn test_suite(db: Db) { let mut iter = tree.iter().unwrap(); assert_eq!(iter.next().unwrap().unwrap(), (ka.into(), vb.into())); assert!(iter.next().is_none()); + drop(iter); tree.insert(kb, vc).unwrap(); assert_eq!(tree.get(kb).unwrap(), Some(vc.into())); @@ -51,19 +52,23 @@ fn test_suite(db: Db) { assert_eq!(iter.next().unwrap().unwrap(), (ka.into(), vb.into())); assert_eq!(iter.next().unwrap().unwrap(), (kb.into(), vc.into())); assert!(iter.next().is_none()); + drop(iter); let mut iter = tree.range(kint..).unwrap(); assert_eq!(iter.next().unwrap().unwrap(), (kb.into(), vc.into())); assert!(iter.next().is_none()); + drop(iter); let mut iter = tree.range_rev(..kint).unwrap(); assert_eq!(iter.next().unwrap().unwrap(), (ka.into(), vb.into())); assert!(iter.next().is_none()); + drop(iter); let mut iter = tree.iter_rev().unwrap(); assert_eq!(iter.next().unwrap().unwrap(), (kb.into(), vc.into())); assert_eq!(iter.next().unwrap().unwrap(), (ka.into(), vb.into())); assert!(iter.next().is_none()); + drop(iter); } #[test] |