@@ -151,8 +151,8 @@ use core::mem::{swap, size_of, ManuallyDrop};
151
151
use core:: ptr;
152
152
use core:: fmt;
153
153
154
- use slice;
155
- use vec:: { self , Vec } ;
154
+ use crate :: slice;
155
+ use crate :: vec:: { self , Vec } ;
156
156
157
157
use super :: SpecExtend ;
158
158
@@ -227,16 +227,16 @@ pub struct PeekMut<'a, T: 'a + Ord> {
227
227
}
228
228
229
229
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
230
- impl < ' a , T : Ord + fmt:: Debug > fmt:: Debug for PeekMut < ' a , T > {
231
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
230
+ impl < T : Ord + fmt:: Debug > fmt:: Debug for PeekMut < ' _ , T > {
231
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
232
232
f. debug_tuple ( "PeekMut" )
233
233
. field ( & self . heap . data [ 0 ] )
234
234
. finish ( )
235
235
}
236
236
}
237
237
238
238
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
239
- impl < ' a , T : Ord > Drop for PeekMut < ' a , T > {
239
+ impl < T : Ord > Drop for PeekMut < ' _ , T > {
240
240
fn drop ( & mut self ) {
241
241
if self . sift {
242
242
self . heap . sift_down ( 0 ) ;
@@ -245,15 +245,15 @@ impl<'a, T: Ord> Drop for PeekMut<'a, T> {
245
245
}
246
246
247
247
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
248
- impl < ' a , T : Ord > Deref for PeekMut < ' a , T > {
248
+ impl < T : Ord > Deref for PeekMut < ' _ , T > {
249
249
type Target = T ;
250
250
fn deref ( & self ) -> & T {
251
251
& self . heap . data [ 0 ]
252
252
}
253
253
}
254
254
255
255
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
256
- impl < ' a , T : Ord > DerefMut for PeekMut < ' a , T > {
256
+ impl < T : Ord > DerefMut for PeekMut < ' _ , T > {
257
257
fn deref_mut ( & mut self ) -> & mut T {
258
258
& mut self . heap . data [ 0 ]
259
259
}
@@ -291,7 +291,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
291
291
292
292
#[ stable( feature = "binaryheap_debug" , since = "1.4.0" ) ]
293
293
impl < T : fmt:: Debug + Ord > fmt:: Debug for BinaryHeap < T > {
294
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
294
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
295
295
f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
296
296
}
297
297
}
@@ -349,7 +349,7 @@ impl<T: Ord> BinaryHeap<T> {
349
349
/// }
350
350
/// ```
351
351
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
352
- pub fn iter ( & self ) -> Iter < T > {
352
+ pub fn iter ( & self ) -> Iter < ' _ , T > {
353
353
Iter { iter : self . data . iter ( ) }
354
354
}
355
355
@@ -400,7 +400,7 @@ impl<T: Ord> BinaryHeap<T> {
400
400
/// assert_eq!(heap.peek(), Some(&2));
401
401
/// ```
402
402
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
403
- pub fn peek_mut ( & mut self ) -> Option < PeekMut < T > > {
403
+ pub fn peek_mut ( & mut self ) -> Option < PeekMut < ' _ , T > > {
404
404
if self . is_empty ( ) {
405
405
None
406
406
} else {
@@ -761,7 +761,7 @@ impl<T: Ord> BinaryHeap<T> {
761
761
/// ```
762
762
#[ inline]
763
763
#[ stable( feature = "drain" , since = "1.6.0" ) ]
764
- pub fn drain ( & mut self ) -> Drain < T > {
764
+ pub fn drain ( & mut self ) -> Drain < ' _ , T > {
765
765
Drain { iter : self . data . drain ( ..) }
766
766
}
767
767
@@ -908,7 +908,7 @@ impl<'a, T> Hole<'a, T> {
908
908
}
909
909
}
910
910
911
- impl < ' a , T > Drop for Hole < ' a , T > {
911
+ impl < T > Drop for Hole < ' _ , T > {
912
912
#[ inline]
913
913
fn drop ( & mut self ) {
914
914
// fill the hole again
@@ -932,8 +932,8 @@ pub struct Iter<'a, T: 'a> {
932
932
}
933
933
934
934
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
935
- impl < ' a , T : ' a + fmt:: Debug > fmt:: Debug for Iter < ' a , T > {
936
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
935
+ impl < T : fmt:: Debug > fmt:: Debug for Iter < ' _ , T > {
936
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
937
937
f. debug_tuple ( "Iter" )
938
938
. field ( & self . iter . as_slice ( ) )
939
939
. finish ( )
@@ -972,14 +972,14 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
972
972
}
973
973
974
974
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
975
- impl < ' a , T > ExactSizeIterator for Iter < ' a , T > {
975
+ impl < T > ExactSizeIterator for Iter < ' _ , T > {
976
976
fn is_empty ( & self ) -> bool {
977
977
self . iter . is_empty ( )
978
978
}
979
979
}
980
980
981
981
#[ stable( feature = "fused" , since = "1.26.0" ) ]
982
- impl < ' a , T > FusedIterator for Iter < ' a , T > { }
982
+ impl < T > FusedIterator for Iter < ' _ , T > { }
983
983
984
984
/// An owning iterator over the elements of a `BinaryHeap`.
985
985
///
@@ -996,7 +996,7 @@ pub struct IntoIter<T> {
996
996
997
997
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
998
998
impl < T : fmt:: Debug > fmt:: Debug for IntoIter < T > {
999
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
999
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1000
1000
f. debug_tuple ( "IntoIter" )
1001
1001
. field ( & self . iter . as_slice ( ) )
1002
1002
. finish ( )
@@ -1050,7 +1050,7 @@ pub struct Drain<'a, T: 'a> {
1050
1050
}
1051
1051
1052
1052
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1053
- impl < ' a , T : ' a > Iterator for Drain < ' a , T > {
1053
+ impl < T > Iterator for Drain < ' _ , T > {
1054
1054
type Item = T ;
1055
1055
1056
1056
#[ inline]
@@ -1065,22 +1065,22 @@ impl<'a, T: 'a> Iterator for Drain<'a, T> {
1065
1065
}
1066
1066
1067
1067
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1068
- impl < ' a , T : ' a > DoubleEndedIterator for Drain < ' a , T > {
1068
+ impl < T > DoubleEndedIterator for Drain < ' _ , T > {
1069
1069
#[ inline]
1070
1070
fn next_back ( & mut self ) -> Option < T > {
1071
1071
self . iter . next_back ( )
1072
1072
}
1073
1073
}
1074
1074
1075
1075
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1076
- impl < ' a , T : ' a > ExactSizeIterator for Drain < ' a , T > {
1076
+ impl < T > ExactSizeIterator for Drain < ' _ , T > {
1077
1077
fn is_empty ( & self ) -> bool {
1078
1078
self . iter . is_empty ( )
1079
1079
}
1080
1080
}
1081
1081
1082
1082
#[ stable( feature = "fused" , since = "1.26.0" ) ]
1083
- impl < ' a , T : ' a > FusedIterator for Drain < ' a , T > { }
1083
+ impl < T > FusedIterator for Drain < ' _ , T > { }
1084
1084
1085
1085
#[ stable( feature = "binary_heap_extras_15" , since = "1.5.0" ) ]
1086
1086
impl < T : Ord > From < Vec < T > > for BinaryHeap < T > {
0 commit comments