Skip to content

Commit 05c26ce

Browse files
committed
FIX: Use stringify!() for struct names
This just seems marginally cleaner, since the struct names are idents.
1 parent 18c9016 commit 05c26ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/map.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,12 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Entry<'a, K, V>
612612
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
613613
match *self {
614614
Entry::Vacant(ref v) => {
615-
f.debug_tuple("Entry")
615+
f.debug_tuple(stringify!(Entry))
616616
.field(v)
617617
.finish()
618618
}
619619
Entry::Occupied(ref o) => {
620-
f.debug_tuple("Entry")
620+
f.debug_tuple(stringify!(Entry))
621621
.field(o)
622622
.finish()
623623
}
@@ -722,7 +722,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
722722

723723
impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for OccupiedEntry<'a, K, V> {
724724
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
725-
f.debug_struct("OccupiedEntry")
725+
f.debug_struct(stringify!(OccupiedEntry))
726726
.field("key", self.key())
727727
.field("value", self.get())
728728
.finish()
@@ -766,7 +766,7 @@ impl<'a, K, V> VacantEntry<'a, K, V> {
766766

767767
impl<'a, K: 'a + fmt::Debug, V: 'a> fmt::Debug for VacantEntry<'a, K, V> {
768768
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
769-
f.debug_tuple("VacantEntry")
769+
f.debug_tuple(stringify!(VacantEntry))
770770
.field(self.key())
771771
.finish()
772772
}

0 commit comments

Comments
 (0)