diff options
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] |