|
30 | 30 | //! }; |
31 | 31 | //! |
32 | 32 | //! let mut map = MultiMap::new(); |
33 | | -//! map.insert("One", ThingIndex::IndexOne, 1); |
34 | | -//! map.insert("Two", ThingIndex::IndexTwo, 2); |
| 33 | +//! map.insert(1, ThingIndex::IndexOne, "Chicken Fried Steak"); |
| 34 | +//! map.insert(2, ThingIndex::IndexTwo, "Blueberry Pancakes"); |
35 | 35 | //! |
36 | | -//! assert!(*map.get_alt(&ThingIndex::IndexOne).unwrap() == 1); |
37 | | -//! assert!(*map.get(&"Two").unwrap() == 2); |
38 | | -//! assert!(map.remove_alt(&ThingIndex::IndexTwo).unwrap() == 2); |
| 36 | +//! assert!(*map.get_alt(&ThingIndex::IndexOne).unwrap() == "Chicken Fried Steak"); |
| 37 | +//! assert!(*map.get(&2).unwrap() == "Blueberry Pancakes"); |
| 38 | +//! assert!(map.remove_alt(&ThingIndex::IndexTwo).unwrap() == "Blueberry Pancakes"); |
39 | 39 | //! # } |
40 | 40 | //! ``` |
41 | 41 |
|
@@ -203,12 +203,12 @@ impl<K1: Eq + Hash + Debug, K2: Eq + Hash + Debug, V: Debug> fmt::Debug for Mult |
203 | 203 | /// }; |
204 | 204 | /// |
205 | 205 | /// let map = multimap!{ |
206 | | -/// "One", ThingIndex::IndexOne => 1, |
207 | | -/// "Two", ThingIndex::IndexTwo => 2, |
| 206 | +/// 1, ThingIndex::IndexOne => "Chicken Fried Steak", |
| 207 | +/// 2, ThingIndex::IndexTwo => "Blueberry Pancakes", |
208 | 208 | /// }; |
209 | 209 | /// |
210 | | -/// assert!(*map.get_alt(&ThingIndex::IndexOne).unwrap() == 1); |
211 | | -/// assert!(*map.get(&"Two").unwrap() == 2); |
| 210 | +/// assert!(*map.get_alt(&ThingIndex::IndexOne).unwrap() == "Chicken Fried Steak"); |
| 211 | +/// assert!(*map.get(&2).unwrap() == "Blueberry Pancakes"); |
212 | 212 | /// # } |
213 | 213 | /// ``` |
214 | 214 | macro_rules! multimap { |
|
0 commit comments