Skip to content

Commit 9f47ff8

Browse files
docs: fmt::Debug*: Fix comments for finish method.
In the code sample for the `finish` method on `DebugList`, `DebugMap`, and `DebugSet`, refer to finishing the list, map, or set, rather than struct as it did.
1 parent a6236fa commit 9f47ff8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/fmt/builders.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
518518
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
519519
/// fmt.debug_set()
520520
/// .entries(self.0.iter())
521-
/// .finish() // Ends the struct formatting.
521+
/// .finish() // Ends the set formatting.
522522
/// }
523523
/// }
524524
///
@@ -648,7 +648,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
648648
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
649649
/// fmt.debug_list()
650650
/// .entries(self.0.iter())
651-
/// .finish() // Ends the struct formatting.
651+
/// .finish() // Ends the list formatting.
652652
/// }
653653
/// }
654654
///
@@ -905,7 +905,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
905905
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
906906
/// fmt.debug_map()
907907
/// .entries(self.0.iter().map(|&(ref k, ref v)| (k, v)))
908-
/// .finish() // Ends the struct formatting.
908+
/// .finish() // Ends the map formatting.
909909
/// }
910910
/// }
911911
///

0 commit comments

Comments
 (0)