Skip to content

Commit 1c8b695

Browse files
committed
Change *EntryRef Debug impl Generics to where
Because otherwise those impls are too long for one line
1 parent 092e3ce commit 1c8b695

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/map.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4406,8 +4406,12 @@ where
44064406
Vacant(VacantEntryRef<'a, 'b, K, Q, V, S, A>),
44074407
}
44084408

4409-
impl<K: Borrow<Q>, Q: ?Sized + Debug, V: Debug, S, A: Allocator> Debug
4410-
for EntryRef<'_, '_, K, Q, V, S, A>
4409+
impl<K, Q, V, S, A> Debug for EntryRef<'_, '_, K, Q, V, S, A>
4410+
where
4411+
K: Borrow<Q>,
4412+
Q: Debug + ?Sized,
4413+
V: Debug,
4414+
A: Allocator,
44114415
{
44124416
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
44134417
match *self {
@@ -4510,8 +4514,12 @@ where
45104514
{
45114515
}
45124516

4513-
impl<K: Borrow<Q>, Q: ?Sized + Debug, V: Debug, S, A: Allocator> Debug
4514-
for OccupiedEntryRef<'_, '_, K, Q, V, S, A>
4517+
impl<K, Q, V, S, A> Debug for OccupiedEntryRef<'_, '_, K, Q, V, S, A>
4518+
where
4519+
K: Borrow<Q>,
4520+
Q: Debug + ?Sized,
4521+
V: Debug,
4522+
A: Allocator,
45154523
{
45164524
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
45174525
f.debug_struct("OccupiedEntryRef")
@@ -4557,8 +4565,11 @@ pub struct VacantEntryRef<'a, 'b, K, Q: ?Sized, V, S, A: Allocator = Global> {
45574565
table: &'a mut HashMap<K, V, S, A>,
45584566
}
45594567

4560-
impl<K: Borrow<Q>, Q: ?Sized + Debug, V, S, A: Allocator> Debug
4561-
for VacantEntryRef<'_, '_, K, Q, V, S, A>
4568+
impl<K, Q, V, S, A> Debug for VacantEntryRef<'_, '_, K, Q, V, S, A>
4569+
where
4570+
K: Borrow<Q>,
4571+
Q: Debug + ?Sized,
4572+
A: Allocator,
45624573
{
45634574
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
45644575
f.debug_tuple("VacantEntryRef").field(&self.key()).finish()

0 commit comments

Comments
 (0)