@@ -1841,32 +1841,27 @@ unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
18411841unsafe impl < ' a , T : Send > Send for Drain < ' a , T > { }
18421842
18431843#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1844- impl < ' a , T > Iterator for Drain < ' a , T >
1845- {
1844+ impl < ' a , T > Iterator for Drain < ' a , T > {
18461845 type Item = T ;
18471846
18481847 #[ inline]
1849- fn next ( & mut self ) -> Option < T >
1850- {
1848+ fn next ( & mut self ) -> Option < T > {
18511849 self . iter . next ( ) . map ( |elt|
18521850 unsafe {
18531851 ptr:: read ( elt as * const _ )
18541852 }
18551853 )
18561854 }
18571855
1858- fn size_hint ( & self ) -> ( usize , Option < usize > )
1859- {
1856+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
18601857 self . iter . size_hint ( )
18611858 }
18621859}
18631860
18641861#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1865- impl < ' a , T > DoubleEndedIterator for Drain < ' a , T >
1866- {
1862+ impl < ' a , T > DoubleEndedIterator for Drain < ' a , T > {
18671863 #[ inline]
1868- fn next_back ( & mut self ) -> Option < T >
1869- {
1864+ fn next_back ( & mut self ) -> Option < T > {
18701865 self . iter . next_back ( ) . map ( |elt|
18711866 unsafe {
18721867 ptr:: read ( elt as * const _ )
@@ -1877,10 +1872,8 @@ impl<'a, T> DoubleEndedIterator for Drain<'a, T>
18771872
18781873#[ unsafe_destructor]
18791874#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1880- impl < ' a , T > Drop for Drain < ' a , T >
1881- {
1882- fn drop ( & mut self )
1883- {
1875+ impl < ' a , T > Drop for Drain < ' a , T > {
1876+ fn drop ( & mut self ) {
18841877 // exhaust self first
18851878 while let Some ( _) = self . next ( ) { }
18861879
0 commit comments