@@ -1406,10 +1406,11 @@ where
1406
1406
}
1407
1407
}
1408
1408
1409
- impl < T , S > BitOr < & HashSet < T , S > > for & HashSet < T , S >
1409
+ impl < T , S , A > BitOr < & HashSet < T , S , A > > for & HashSet < T , S , A >
1410
1410
where
1411
1411
T : Eq + Hash + Clone ,
1412
1412
S : BuildHasher + Default ,
1413
+ A : Allocator ,
1413
1414
{
1414
1415
type Output = HashSet < T , S > ;
1415
1416
@@ -1433,15 +1434,16 @@ where
1433
1434
/// }
1434
1435
/// assert_eq!(i, expected.len());
1435
1436
/// ```
1436
- fn bitor ( self , rhs : & HashSet < T , S > ) -> HashSet < T , S > {
1437
+ fn bitor ( self , rhs : & HashSet < T , S , A > ) -> HashSet < T , S > {
1437
1438
self . union ( rhs) . cloned ( ) . collect ( )
1438
1439
}
1439
1440
}
1440
1441
1441
- impl < T , S > BitAnd < & HashSet < T , S > > for & HashSet < T , S >
1442
+ impl < T , S , A > BitAnd < & HashSet < T , S , A > > for & HashSet < T , S , A >
1442
1443
where
1443
1444
T : Eq + Hash + Clone ,
1444
1445
S : BuildHasher + Default ,
1446
+ A : Allocator ,
1445
1447
{
1446
1448
type Output = HashSet < T , S > ;
1447
1449
@@ -1465,15 +1467,16 @@ where
1465
1467
/// }
1466
1468
/// assert_eq!(i, expected.len());
1467
1469
/// ```
1468
- fn bitand ( self , rhs : & HashSet < T , S > ) -> HashSet < T , S > {
1470
+ fn bitand ( self , rhs : & HashSet < T , S , A > ) -> HashSet < T , S > {
1469
1471
self . intersection ( rhs) . cloned ( ) . collect ( )
1470
1472
}
1471
1473
}
1472
1474
1473
- impl < T , S > BitXor < & HashSet < T , S > > for & HashSet < T , S >
1475
+ impl < T , S , A > BitXor < & HashSet < T , S , A > > for & HashSet < T , S , A >
1474
1476
where
1475
1477
T : Eq + Hash + Clone ,
1476
1478
S : BuildHasher + Default ,
1479
+ A : Allocator ,
1477
1480
{
1478
1481
type Output = HashSet < T , S > ;
1479
1482
@@ -1497,15 +1500,16 @@ where
1497
1500
/// }
1498
1501
/// assert_eq!(i, expected.len());
1499
1502
/// ```
1500
- fn bitxor ( self , rhs : & HashSet < T , S > ) -> HashSet < T , S > {
1503
+ fn bitxor ( self , rhs : & HashSet < T , S , A > ) -> HashSet < T , S > {
1501
1504
self . symmetric_difference ( rhs) . cloned ( ) . collect ( )
1502
1505
}
1503
1506
}
1504
1507
1505
- impl < T , S > Sub < & HashSet < T , S > > for & HashSet < T , S >
1508
+ impl < T , S , A > Sub < & HashSet < T , S , A > > for & HashSet < T , S , A >
1506
1509
where
1507
1510
T : Eq + Hash + Clone ,
1508
1511
S : BuildHasher + Default ,
1512
+ A : Allocator ,
1509
1513
{
1510
1514
type Output = HashSet < T , S > ;
1511
1515
@@ -1529,15 +1533,16 @@ where
1529
1533
/// }
1530
1534
/// assert_eq!(i, expected.len());
1531
1535
/// ```
1532
- fn sub ( self , rhs : & HashSet < T , S > ) -> HashSet < T , S > {
1536
+ fn sub ( self , rhs : & HashSet < T , S , A > ) -> HashSet < T , S > {
1533
1537
self . difference ( rhs) . cloned ( ) . collect ( )
1534
1538
}
1535
1539
}
1536
1540
1537
- impl < T , S > BitOrAssign < & HashSet < T , S > > for HashSet < T , S >
1541
+ impl < T , S , A > BitOrAssign < & HashSet < T , S , A > > for HashSet < T , S , A >
1538
1542
where
1539
1543
T : Eq + Hash + Clone ,
1540
1544
S : BuildHasher ,
1545
+ A : Allocator ,
1541
1546
{
1542
1547
/// Modifies this set to contain the union of `self` and `rhs`.
1543
1548
///
@@ -1559,7 +1564,7 @@ where
1559
1564
/// }
1560
1565
/// assert_eq!(i, expected.len());
1561
1566
/// ```
1562
- fn bitor_assign ( & mut self , rhs : & HashSet < T , S > ) {
1567
+ fn bitor_assign ( & mut self , rhs : & HashSet < T , S , A > ) {
1563
1568
for item in rhs {
1564
1569
if !self . contains ( item) {
1565
1570
self . insert ( item. clone ( ) ) ;
@@ -1568,10 +1573,11 @@ where
1568
1573
}
1569
1574
}
1570
1575
1571
- impl < T , S > BitAndAssign < & HashSet < T , S > > for HashSet < T , S >
1576
+ impl < T , S , A > BitAndAssign < & HashSet < T , S , A > > for HashSet < T , S , A >
1572
1577
where
1573
1578
T : Eq + Hash + Clone ,
1574
1579
S : BuildHasher ,
1580
+ A : Allocator ,
1575
1581
{
1576
1582
/// Modifies this set to contain the intersection of `self` and `rhs`.
1577
1583
///
@@ -1593,15 +1599,16 @@ where
1593
1599
/// }
1594
1600
/// assert_eq!(i, expected.len());
1595
1601
/// ```
1596
- fn bitand_assign ( & mut self , rhs : & HashSet < T , S > ) {
1602
+ fn bitand_assign ( & mut self , rhs : & HashSet < T , S , A > ) {
1597
1603
self . retain ( |item| rhs. contains ( item) ) ;
1598
1604
}
1599
1605
}
1600
1606
1601
- impl < T , S > BitXorAssign < & HashSet < T , S > > for HashSet < T , S >
1607
+ impl < T , S , A > BitXorAssign < & HashSet < T , S , A > > for HashSet < T , S , A >
1602
1608
where
1603
1609
T : Eq + Hash + Clone ,
1604
1610
S : BuildHasher ,
1611
+ A : Allocator ,
1605
1612
{
1606
1613
/// Modifies this set to contain the symmetric difference of `self` and `rhs`.
1607
1614
///
@@ -1623,7 +1630,7 @@ where
1623
1630
/// }
1624
1631
/// assert_eq!(i, expected.len());
1625
1632
/// ```
1626
- fn bitxor_assign ( & mut self , rhs : & HashSet < T , S > ) {
1633
+ fn bitxor_assign ( & mut self , rhs : & HashSet < T , S , A > ) {
1627
1634
for item in rhs {
1628
1635
let entry = self . map . raw_entry_mut ( ) . from_key ( item) ;
1629
1636
match entry {
@@ -1638,10 +1645,11 @@ where
1638
1645
}
1639
1646
}
1640
1647
1641
- impl < T , S > SubAssign < & HashSet < T , S > > for HashSet < T , S >
1648
+ impl < T , S , A > SubAssign < & HashSet < T , S , A > > for HashSet < T , S , A >
1642
1649
where
1643
1650
T : Eq + Hash + Clone ,
1644
1651
S : BuildHasher ,
1652
+ A : Allocator ,
1645
1653
{
1646
1654
/// Modifies this set to contain the difference of `self` and `rhs`.
1647
1655
///
@@ -1663,7 +1671,7 @@ where
1663
1671
/// }
1664
1672
/// assert_eq!(i, expected.len());
1665
1673
/// ```
1666
- fn sub_assign ( & mut self , rhs : & HashSet < T , S > ) {
1674
+ fn sub_assign ( & mut self , rhs : & HashSet < T , S , A > ) {
1667
1675
if rhs. len ( ) < self . len ( ) {
1668
1676
for item in rhs {
1669
1677
self . remove ( item) ;
0 commit comments