Skip to content

Commit

Permalink
add Debug for DequeSet
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jan 14, 2025
1 parent b1a1727 commit 1bd3f8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions turbopack/crates/turbo-tasks-backend/src/utils/deque_set.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::{
collections::{HashSet, VecDeque},
fmt::Debug,
hash::{BuildHasher, BuildHasherDefault, Hash},
};

Expand All @@ -20,6 +21,12 @@ pub struct DequeSet<T, B: BuildHasher = BuildHasherDefault<FxHasher>> {
queue: VecDeque<T>,
}

impl<T: Debug, B: BuildHasher> Debug for DequeSet<T, B> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.queue.fmt(f)
}
}

impl<T, B: BuildHasher + Default> Default for DequeSet<T, B> {
fn default() -> Self {
Self {
Expand Down

0 comments on commit 1bd3f8d

Please sign in to comment.