Skip to content

Commit f67749f

Browse files
committed
Remove A: Allocator generics bound from BitOr and BitAnd impl
BitXor and Sub already don't have them, and its not like we guarantee returning a set with the same A type anyway. I would be fine with adding it to BitXor and Sub instead, but I think it should be consistent.
1 parent 65c553d commit f67749f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/set.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,11 +1406,10 @@ where
14061406
}
14071407
}
14081408

1409-
impl<T, S, A> BitOr<&HashSet<T, S, A>> for &HashSet<T, S, A>
1409+
impl<T, S> BitOr<&HashSet<T, S>> for &HashSet<T, S>
14101410
where
14111411
T: Eq + Hash + Clone,
14121412
S: BuildHasher + Default,
1413-
A: Allocator,
14141413
{
14151414
type Output = HashSet<T, S>;
14161415

@@ -1434,16 +1433,15 @@ where
14341433
/// }
14351434
/// assert_eq!(i, expected.len());
14361435
/// ```
1437-
fn bitor(self, rhs: &HashSet<T, S, A>) -> HashSet<T, S> {
1436+
fn bitor(self, rhs: &HashSet<T, S>) -> HashSet<T, S> {
14381437
self.union(rhs).cloned().collect()
14391438
}
14401439
}
14411440

1442-
impl<T, S, A> BitAnd<&HashSet<T, S, A>> for &HashSet<T, S, A>
1441+
impl<T, S> BitAnd<&HashSet<T, S>> for &HashSet<T, S>
14431442
where
14441443
T: Eq + Hash + Clone,
14451444
S: BuildHasher + Default,
1446-
A: Allocator,
14471445
{
14481446
type Output = HashSet<T, S>;
14491447

@@ -1467,7 +1465,7 @@ where
14671465
/// }
14681466
/// assert_eq!(i, expected.len());
14691467
/// ```
1470-
fn bitand(self, rhs: &HashSet<T, S, A>) -> HashSet<T, S> {
1468+
fn bitand(self, rhs: &HashSet<T, S>) -> HashSet<T, S> {
14711469
self.intersection(rhs).cloned().collect()
14721470
}
14731471
}

0 commit comments

Comments
 (0)