From 38011dacbe24f9e35561aaba19cda0931b21a52d Mon Sep 17 00:00:00 2001 From: NullData Date: Wed, 21 May 2014 15:22:09 +0200 Subject: [PATCH] Fixed formatter use documentation. I changed the documentation examples where `write!( f, ... )` is used to `write!( f.buf, ... )` since `io::Formatter` doesn't actually implement `io::Writer`, but `Formatter.buf` does. --- src/libstd/fmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/fmt.rs b/src/libstd/fmt.rs index 86b77a46a3980..e38d9b164af43 100644 --- a/src/libstd/fmt.rs +++ b/src/libstd/fmt.rs @@ -196,10 +196,10 @@ struct Vector2D { impl fmt::Show for Vector2D { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - // The `f` value implements the `Writer` trait, which is what the + // The `f.buf` value implements the `Writer` trait, which is what the // write! macro is expecting. Note that this formatting ignores the // various flags provided to format strings. - write!(f, "({}, {})", self.x, self.y) + write!(f.buf, "({}, {})", self.x, self.y) } }