From f478ff4a249b14db2d2cb99900e7894717eaf188 Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Thu, 27 Apr 2023 16:24:44 -0400 Subject: [PATCH] tokio: add `CountedLinkedList::for_each` (#5660) --- tokio/src/util/linked_list.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tokio/src/util/linked_list.rs b/tokio/src/util/linked_list.rs index 432057fbc..ca6ef0e7b 100644 --- a/tokio/src/util/linked_list.rs +++ b/tokio/src/util/linked_list.rs @@ -342,6 +342,15 @@ cfg_io_readiness! { } cfg_taskdump! { + impl CountedLinkedList { + pub(crate) fn for_each(&mut self, f: F) + where + F: FnMut(&T::Handle), + { + self.list.for_each(f) + } + } + impl LinkedList { pub(crate) fn for_each(&mut self, mut f: F) where