From b0cf29052c0e40a62f89d6b1b9aeda9b83149b03 Mon Sep 17 00:00:00 2001 From: Phil Rutschman Date: Fri, 25 Apr 2025 16:35:22 -0700 Subject: [PATCH] Add failing test for truncate --- src/index_map.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index_map.rs b/src/index_map.rs index bc752368..bb31f112 100644 --- a/src/index_map.rs +++ b/src/index_map.rs @@ -1258,6 +1258,7 @@ where /// map.insert(1, "c").unwrap(); /// map.truncate(2); /// assert_eq!(map.len(), 2); + /// assert_eq!(map.get(&1), None); /// /// let mut iter = map.iter(); /// assert_eq!(iter.next(), Some((&3, &"a")));