Skip to content

Commit 979db7d

Browse files
committed
Return () from Waitlist::push
The returned bool was never used.
1 parent bbccdf0 commit 979db7d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/conn/pool/waitlist.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ impl Waitlist {
2525
}
2626
}
2727

28-
/// Returns `true` if pushed.
29-
pub(crate) fn push(&mut self, waker: Waker, queue_id: QueueId) -> bool {
28+
pub(crate) fn push(&mut self, waker: Waker, queue_id: QueueId) {
3029
// The documentation of Future::poll says:
3130
// Note that on multiple calls to poll, only the Waker from
3231
// the Context passed to the most recent call should be
@@ -38,14 +37,12 @@ impl Waitlist {
3837
//
3938
// This means we have to remove first to have the most recent
4039
// waker in the queue.
41-
let occupied = self.remove(queue_id);
40+
self.remove(queue_id);
4241
self.queue.push(QueuedWaker { queue_id, waker }, queue_id);
4342

4443
self.metrics
4544
.active_wait_requests
4645
.fetch_add(1, atomic::Ordering::Relaxed);
47-
48-
!occupied
4946
}
5047

5148
pub(crate) fn pop(&mut self) -> Option<Waker> {

0 commit comments

Comments
 (0)