Skip to content

Commit

Permalink
Try fixing dead code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwe committed May 29, 2023
1 parent dd0fbc3 commit 3b46c74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tokio/src/runtime/task/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ impl<S: 'static> OwnedTasks<S> {
}
}

pub(crate) fn active_tasks_count(&self) -> usize {
self.inner.lock().list.count()
cfg_metrics! {
pub(crate) fn active_tasks_count(&self) -> usize {
self.inner.lock().list.count()
}
}

pub(crate) fn remove(&self, task: &Task<S>) -> Option<Task<S>> {
Expand Down
1 change: 1 addition & 0 deletions tokio/src/util/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ impl<L: Link> CountedLinkedList<L, L::Target> {
val
}

#[cfg(any(all(tokio_unstable, not(loom), feature = "stats"), test))]
pub(crate) fn count(&self) -> usize {
self.count
}
Expand Down

0 comments on commit 3b46c74

Please sign in to comment.