]> git.lizzy.rs Git - rust.git/commitdiff
Fix debug builder examples examples
authorSteven Fackler <sfackler@gmail.com>
Tue, 19 May 2015 03:57:11 +0000 (20:57 -0700)
committerSteven Fackler <sfackler@gmail.com>
Tue, 19 May 2015 03:57:11 +0000 (20:57 -0700)
src/libcore/fmt/mod.rs

index 796d901d73c21b79c4a520f752a9d1a9bb621241..22575f340d78af7ac505cc4a779790d1a92e2f3b 100644 (file)
@@ -787,7 +787,7 @@ pub fn debug_tuple<'b>(&'b mut self, name: &str) -> DebugTuple<'b, 'a> {
     ///
     /// impl fmt::Debug for Foo {
     ///     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-    ///         fnt.debug_list().entries(self.0.iter()).finish()
+    ///         fmt.debug_list().entries(self.0.iter()).finish()
     ///     }
     /// }
     ///
@@ -839,7 +839,7 @@ pub fn debug_set<'b>(&'b mut self) -> DebugSet<'b, 'a> {
     ///
     /// impl fmt::Debug for Foo {
     ///     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-    ///         fmt.debug_map().entries(self.0.iter()).finish()
+    ///         fmt.debug_map().entries(self.0.iter().map(|&(ref k, ref v)| (k, v))).finish()
     ///     }
     /// }
     ///