File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,13 @@ fn test_extend_ref() {
133
133
134
134
#[ test]
135
135
fn test_remove_item ( ) {
136
- let mut v = vec ! [ 1 , 2 , 3 ] ;
136
+ let mut v = vec ! [ 1 , 2 , 3 ] ;
137
137
v. remove_item ( & 1 ) ;
138
138
139
139
assert_eq ! ( v. len( ) , 2 ) ;
140
- assert_eq ! ( v, [ 2 , 3 ] ) ;
140
+ assert_eq ! ( v, [ 2 , 3 ] ) ;
141
141
142
- let mut w = vec ! [ 1 , 2 , 3 ] ;
142
+ let mut w = vec ! [ 1 , 2 , 3 ] ;
143
143
w. remove_item ( & 4 ) ;
144
144
145
145
assert_eq ! ( w. len( ) , 3 ) ;
Original file line number Diff line number Diff line change @@ -1690,8 +1690,7 @@ impl<T: PartialEq> Vec<T> {
1690
1690
}
1691
1691
}
1692
1692
1693
- impl < T > Vec < T > {
1694
-
1693
+ impl < T > Vec < T > {
1695
1694
/// Removes the first instance of `item` from the vector if the item exists.
1696
1695
///
1697
1696
/// # Examples
@@ -1707,12 +1706,12 @@ impl <T> Vec<T> {
1707
1706
1708
1707
#[ unstable( feature = "vec_remove_item" , reason = "recently added" , issue = "40062" ) ]
1709
1708
pub fn remove_item < V > ( & mut self , item : & V ) -> Option < T >
1710
- where T : PartialEq < V >
1709
+ where
1710
+ T : PartialEq < V > ,
1711
1711
{
1712
1712
let pos = self . iter ( ) . position ( |x| * x == * item) ?;
1713
1713
Some ( self . remove ( pos) )
1714
1714
}
1715
-
1716
1715
}
1717
1716
1718
1717
////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments