]> git.lizzy.rs Git - rust.git/commitdiff
fmt: Make sure write_fmt's implementation can use write_char
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Wed, 17 Feb 2016 21:25:22 +0000 (22:25 +0100)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Wed, 17 Feb 2016 21:26:44 +0000 (22:26 +0100)
It looks like the Adapter inside write_fmt was never updated to forward
the write_char method.

src/libcore/fmt/mod.rs

index 5c67930c52f6afd27049f5ee1221edc053f023dd..a3b09e9db42d137a9aa3e96d02ab52fbd0424eba 100644 (file)
@@ -121,6 +121,10 @@ fn write_str(&mut self, s: &str) -> Result {
                 self.0.write_str(s)
             }
 
+            fn write_char(&mut self, c: char) -> Result {
+                self.0.write_char(c)
+            }
+
             fn write_fmt(&mut self, args: Arguments) -> Result {
                 self.0.write_fmt(args)
             }