1+ use crate :: alloc:: { Allocator , Global } ;
12use core:: ptr:: { self } ;
23use core:: slice:: { self } ;
3- use crate :: alloc:: { Allocator , Global } ;
44
5- use super :: { Vec } ;
5+ use super :: Vec ;
66
77/// An iterator which uses a closure to determine if an element should be removed.
88///
@@ -45,8 +45,8 @@ pub struct DrainFilter<
4545}
4646
4747impl < T , F , A : Allocator > DrainFilter < ' _ , T , F , A >
48- where
49- F : FnMut ( & mut T ) -> bool ,
48+ where
49+ F : FnMut ( & mut T ) -> bool ,
5050{
5151 /// Returns a reference to the underlying allocator.
5252 #[ unstable( feature = "allocator_api" , issue = "32838" ) ]
@@ -58,8 +58,8 @@ impl<T, F, A: Allocator> DrainFilter<'_, T, F, A>
5858
5959#[ unstable( feature = "drain_filter" , reason = "recently added" , issue = "43244" ) ]
6060impl < T , F , A : Allocator > Iterator for DrainFilter < ' _ , T , F , A >
61- where
62- F : FnMut ( & mut T ) -> bool ,
61+ where
62+ F : FnMut ( & mut T ) -> bool ,
6363{
6464 type Item = T ;
6565
@@ -96,20 +96,20 @@ impl<T, F, A: Allocator> Iterator for DrainFilter<'_, T, F, A>
9696
9797#[ unstable( feature = "drain_filter" , reason = "recently added" , issue = "43244" ) ]
9898impl < T , F , A : Allocator > Drop for DrainFilter < ' _ , T , F , A >
99- where
100- F : FnMut ( & mut T ) -> bool ,
99+ where
100+ F : FnMut ( & mut T ) -> bool ,
101101{
102102 fn drop ( & mut self ) {
103103 struct BackshiftOnDrop < ' a , ' b , T , F , A : Allocator >
104- where
105- F : FnMut ( & mut T ) -> bool ,
104+ where
105+ F : FnMut ( & mut T ) -> bool ,
106106 {
107107 drain : & ' b mut DrainFilter < ' a , T , F , A > ,
108108 }
109109
110110 impl < ' a , ' b , T , F , A : Allocator > Drop for BackshiftOnDrop < ' a , ' b , T , F , A >
111- where
112- F : FnMut ( & mut T ) -> bool ,
111+ where
112+ F : FnMut ( & mut T ) -> bool ,
113113 {
114114 fn drop ( & mut self ) {
115115 unsafe {
@@ -140,4 +140,4 @@ impl<T, F, A: Allocator> Drop for DrainFilter<'_, T, F, A>
140140 backshift. drain . for_each ( drop) ;
141141 }
142142 }
143- }
143+ }
0 commit comments