Skip to content

Commit 612057b

Browse files
committed
Auto merge of #296 - CAD97:relax-set-debug, r=Amanieu
Relax the bounds on HashSet: Debug This looks to be just an oversight. The bounds on `HashMap` are similarly loose: https://github.com/rust-lang/hashbrown/blob/1e1bb230bc376f6db99e08c055fd758d142aa72d/src/map.rs#L1540-L1545 And `std::collections::HashSet` has always only bounded `T` by `Debug` and not `Eq`/`Hash` here.
2 parents 1e1bb23 + 69e3da9 commit 612057b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/set.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,7 @@ where
11281128

11291129
impl<T, S, A> fmt::Debug for HashSet<T, S, A>
11301130
where
1131-
T: Eq + Hash + fmt::Debug,
1132-
S: BuildHasher,
1131+
T: fmt::Debug,
11331132
A: Allocator + Clone,
11341133
{
11351134
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

0 commit comments

Comments
 (0)