Skip to content

Commit a7c8a28

Browse files
author
AbeZbm
committed
Add one test
1 parent 6263458 commit a7c8a28

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/map.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5058,6 +5058,11 @@ mod test_map {
50585058
Some(x) => *x = new,
50595059
}
50605060
assert_eq!(m.get(&5), Some(&new));
5061+
5062+
let mut hashmap: HashMap<i32, String> = HashMap::default();
5063+
let key = &1;
5064+
let result = hashmap.get_mut(key);
5065+
assert!(result.is_none());
50615066
}
50625067

50635068
#[test]

0 commit comments

Comments
 (0)