diff --git a/src/identified_vec.rs b/src/identified_vec.rs index 0d278c5..fd0f080 100644 --- a/src/identified_vec.rs +++ b/src/identified_vec.rs @@ -608,14 +608,14 @@ where } } - /// Removes the given element from the `indentified_vec`. + /// Removes the given element from the `identified_vec`. /// - /// If the element is found in the `indentified_vec`, this method returns the element. + /// If the element is found in the `identified_vec`, this method returns the element. /// - /// If the element isn't found in the `indentified_vec`, `remove` returns `None`. + /// If the element isn't found in the `identified_vec`, `remove` returns `None`. /// /// - Parameter element: The element to remove. - /// - Returns: The value that was removed, or `None` if the element was not present in the `indentified_vec`. + /// - Returns: The value that was removed, or `None` if the element was not present in the `identified_vec`. /// - Complexity: O(`count`) #[inline] pub fn remove(&mut self, element: &Element) -> Option { @@ -865,6 +865,15 @@ mod tests { assert_eq!(identified_vec.ids(), &[1, 2, 3]) } + #[test] + fn debug_str() { + let identified_vec = SUT::from_iter([1, 2, 3]); + assert_eq!( + identified_vec.debug_str(), + "order: [1, 2, 3]\nelements: {2: 2, 1: 1, 3: 3}" + ) + } + #[test] fn elements() { let vec = vec![User::blob(), User::blob_jr(), User::blob_sr()];