File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -572,16 +572,20 @@ impl Display for Arguments<'_> {
572572///
573573/// [`debug_struct`]: Formatter::debug_struct
574574///
575- /// For custom cases, it's also possible to implement `Debug` using the [`write!`] macro:
575+ /// Types that do not wish to use the standard suite of debug representations
576+ /// provided by the `Formatter` trait (`debug_struct`, `debug_tuple`,
577+ /// `debut_list`, `debug_set`, `debug_map`) can do something totally custom by
578+ /// manually writing an arbitrary representation to the `Formatter`.
579+ ///
576580/// ```
577581/// # use std::fmt;
578582/// # struct Point {
579583/// # x: i32,
580584/// # y: i32,
581585/// # }
582- ///
586+ /// #
583587/// impl fmt::Debug for Point {
584- /// fn fmt(&self, f: &mut fmt::Formatter <'_>) -> fmt::Result {
588+ /// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
585589/// write!(f, "Point [{} {}]", self.x, self.y)
586590/// }
587591/// }
You can’t perform that action at this time.
0 commit comments