From 3c0c8fc43a6dddda37c9e833279e0f8859a05f1c Mon Sep 17 00:00:00 2001 From: Steven Fackler <sfackler@gmail.com> Date: Sat, 28 Mar 2015 15:55:02 -0700 Subject: [PATCH] Oops fix output examples --- src/libcore/fmt/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index e2b12b1c20d..bd802cfb559 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -696,7 +696,7 @@ impl<'a> Formatter<'a> { /// } /// } /// - /// // prints "Foo { 10, 11 }" + /// // prints "[10, 11]" /// println!("{:?}", Foo(vec![10, 11])); /// ``` #[unstable(feature = "debug_builders", reason = "method was just created")] @@ -722,7 +722,7 @@ impl<'a> Formatter<'a> { /// } /// } /// - /// // prints "Foo { 10, 11 }" + /// // prints "{10, 11}" /// println!("{:?}", Foo(vec![10, 11])); /// ``` #[unstable(feature = "debug_builders", reason = "method was just created")] @@ -744,11 +744,11 @@ impl<'a> Formatter<'a> { /// /// impl fmt::Debug for Foo { /// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - /// self.0.iter().fold(fmt.debug_map(), |b, (k, v)| b.entry(k, v)).finish() + /// self.0.iter().fold(fmt.debug_map(), |b, &(ref k, ref v)| b.entry(k, v)).finish() /// } /// } /// - /// // prints "Foo { "A": 10, "B": 11 }" + /// // prints "{"A": 10, "B": 11}" /// println!("{:?}", Foo(vec![("A".to_string(), 10), ("B".to_string(), 11)])); /// ``` #[unstable(feature = "debug_builders", reason = "method was just created")]