Skip to content

Commit 7e97852

Browse files
committed
remove unnecessary allocation from example code
1 parent 64c8d9b commit 7e97852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//! assert_eq!(map[&3], 30);
2626
//!
2727
//! let items: Vec<(i32, i32)> = map.iter().map(|t| (*t.0, *t.1)).collect();
28-
//! assert_eq!(vec![(2, 20), (1, 10), (3, 30)], items);
28+
//! assert_eq!(items, [(2, 20), (1, 10), (3, 30)]);
2929
//! ```
3030
3131
#![feature(hashmap_hasher)]

0 commit comments

Comments
 (0)