We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a2b602 commit e5f2524Copy full SHA for e5f2524
src/libstd/collections/mod.rs
@@ -299,15 +299,15 @@
299
//! #### Counting the number of times each character in a string occurs
300
//!
301
//! ```
302
-//! use std::collections::btree_map::{BTreeMap, Occupied, Vacant};
+//! use std::collections::btree_map::{BTreeMap, Entry};
303
304
//! let mut count = BTreeMap::new();
305
//! let message = "she sells sea shells by the sea shore";
306
307
//! for c in message.chars() {
308
//! match count.entry(c) {
309
-//! Vacant(entry) => { entry.insert(1u); },
310
-//! Occupied(mut entry) => *entry.get_mut() += 1,
+//! Entry::Vacant(entry) => { entry.insert(1u); },
+//! Entry::Occupied(mut entry) => *entry.get_mut() += 1,
311
//! }
312
313
0 commit comments