Skip to content

Commit 92cbc27

Browse files
author
Gianmarco Garrisi
committed
Resolve warning "mismatched_lifetime_syntaxes"
1 parent c46b44b commit 92cbc27

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/double_priority_queue/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ impl<I, P, H> DoublePriorityQueue<I, P, H> {
192192

193193
/// Returns an iterator in arbitrary order over the
194194
/// (item, priority) elements in the queue
195-
pub fn iter(&self) -> Iter<I, P> {
195+
pub fn iter(&self) -> Iter<'_, I, P> {
196196
self.store.iter()
197197
}
198198

199199
/// Clears the PriorityQueue, returning an iterator over the removed elements in arbitrary order.
200200
/// If the iterator is dropped before being fully consumed, it drops the remaining elements in arbitrary order.
201-
pub fn drain(&mut self) -> Drain<I, P> {
201+
pub fn drain(&mut self) -> Drain<'_, I, P> {
202202
self.store.drain()
203203
}
204204

@@ -289,7 +289,7 @@ where
289289
/// will be rebuilt once the `IterMut` goes out of scope. It would be
290290
/// rebuilt even if no priority value would have been modified, but the
291291
/// procedure will not move anything, but just compare the priorities.
292-
pub fn iter_mut(&mut self) -> IterMut<I, P, H> {
292+
pub fn iter_mut(&mut self) -> IterMut<'_, I, P, H> {
293293
IterMut::new(self)
294294
}
295295

@@ -489,7 +489,7 @@ where
489489
/// assert_eq!(pq.into_vec(), vec!["Bananas"]);
490490
/// # }
491491
/// ```
492-
pub fn extract_if<F>(&mut self, predicate: F) -> ExtractIf<I, P, F, H>
492+
pub fn extract_if<F>(&mut self, predicate: F) -> ExtractIf<'_, I, P, F, H>
493493
where
494494
F: FnMut(&mut I, &mut P) -> bool,
495495
{

src/priority_queue/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ where
176176
impl<I, P, H> PriorityQueue<I, P, H> {
177177
/// Returns an iterator in arbitrary order over the
178178
/// `(item, priority)` elements in the queue
179-
pub fn iter(&self) -> Iter<I, P> {
179+
pub fn iter(&self) -> Iter<'_, I, P> {
180180
self.store.iter()
181181
}
182182

@@ -188,7 +188,7 @@ impl<I, P, H> PriorityQueue<I, P, H> {
188188

189189
/// Clears the `PriorityQueue`, returning an iterator over the removed elements in arbitrary order.
190190
/// If the iterator is dropped before being fully consumed, it drops the remaining elements in arbitrary order.
191-
pub fn drain(&mut self) -> Drain<I, P> {
191+
pub fn drain(&mut self) -> Drain<'_, I, P> {
192192
self.store.drain()
193193
}
194194

@@ -293,7 +293,7 @@ where
293293
///
294294
/// It would be rebuilt even if no priority value would have been modified,
295295
/// but the procedure will not move anything, but just compare the priorities.
296-
pub fn iter_mut(&mut self) -> IterMut<I, P, H> {
296+
pub fn iter_mut(&mut self) -> IterMut<'_, I, P, H> {
297297
IterMut::new(self)
298298
}
299299

@@ -401,7 +401,7 @@ where
401401
/// assert_eq!(pq.into_vec(), vec!["Bananas"]);
402402
/// # }
403403
/// ```
404-
pub fn extract_if<F>(&mut self, predicate: F) -> ExtractIf<I, P, F, H>
404+
pub fn extract_if<F>(&mut self, predicate: F) -> ExtractIf<'_, I, P, F, H>
405405
where
406406
F: FnMut(&mut I, &mut P) -> bool,
407407
{

src/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ where
161161
impl<I, P, H> Store<I, P, H> {
162162
/// Returns an iterator in arbitrary order over the
163163
/// (item, priority) elements in the queue
164-
pub fn iter(&self) -> Iter<I, P> {
164+
pub fn iter(&self) -> Iter<'_, I, P> {
165165
Iter {
166166
iter: self.map.iter(),
167167
}

0 commit comments

Comments
 (0)