mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Rollup merge of #114091 - waywardmonkeys:doc-fmt-finish-comments, r=GuillaumeGomez
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.
This commit is contained in:
commit
ee54896ca1
@ -518,7 +518,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
|
|||||||
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
/// fmt.debug_set()
|
/// fmt.debug_set()
|
||||||
/// .entries(self.0.iter())
|
/// .entries(self.0.iter())
|
||||||
/// .finish() // Ends the struct formatting.
|
/// .finish() // Ends the set formatting.
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
@ -648,7 +648,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
|
|||||||
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
/// fmt.debug_list()
|
/// fmt.debug_list()
|
||||||
/// .entries(self.0.iter())
|
/// .entries(self.0.iter())
|
||||||
/// .finish() // Ends the struct formatting.
|
/// .finish() // Ends the list formatting.
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
@ -905,7 +905,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
|
|||||||
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
/// fmt.debug_map()
|
/// fmt.debug_map()
|
||||||
/// .entries(self.0.iter().map(|&(ref k, ref v)| (k, v)))
|
/// .entries(self.0.iter().map(|&(ref k, ref v)| (k, v)))
|
||||||
/// .finish() // Ends the struct formatting.
|
/// .finish() // Ends the map formatting.
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user