File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1296,7 +1296,7 @@ impl<T: PartialEq> Vec<T> {
12961296 pub fn dedup ( & mut self ) {
12971297 self . dedup_by ( |a, b| a == b)
12981298 }
1299-
1299+
13001300 /// Removes the first instance of `item` from the vector if the item exists.
13011301 ///
13021302 /// # Examples
@@ -1308,13 +1308,12 @@ impl<T: PartialEq> Vec<T> {
13081308 ///
13091309 /// assert_eq!(vec, vec![2, 3, 1]);
13101310 /// ```
1311- #[ unstable( feature = "vec_remove_item" , reason = "recently added" , issue = "38143 " ) ]
1311+ #[ unstable( feature = "vec_remove_item" , reason = "recently added" , issue = "40062 " ) ]
13121312 pub fn remove_item ( & mut self , item : & T ) -> Option < T > {
13131313 let pos = match self . iter ( ) . position ( |x| * x == * item) {
13141314 Some ( x) => x,
13151315 None => return None ,
13161316 } ;
1317-
13181317 Some ( self . remove ( pos) )
13191318 }
13201319}
You can’t perform that action at this time.
0 commit comments