Skip to content

Commit

Permalink
docs: fmt::Debug*: Fix comments for finish method.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waywardmonkeys committed Jul 26, 2023
1 parent a6236fa commit 9f47ff8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/fmt/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
/// fmt.debug_set()
/// .entries(self.0.iter())
/// .finish() // Ends the struct formatting.
/// .finish() // Ends the set formatting.
/// }
/// }
///
Expand Down Expand Up @@ -648,7 +648,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
/// fmt.debug_list()
/// .entries(self.0.iter())
/// .finish() // Ends the struct formatting.
/// .finish() // Ends the list formatting.
/// }
/// }
///
Expand Down Expand Up @@ -905,7 +905,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
/// fmt.debug_map()
/// .entries(self.0.iter().map(|&(ref k, ref v)| (k, v)))
/// .finish() // Ends the struct formatting.
/// .finish() // Ends the map formatting.
/// }
/// }
///
Expand Down

0 comments on commit 9f47ff8

Please sign in to comment.