diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-10 14:05:06 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-15 23:22:06 -0700 |
| commit | 1de4b65d2a88e88201026485f9622916c5717555 (patch) | |
| tree | 1aa5e8506b8367075cfa4f1546c27df2a943dff9 /src/libstd/io/mod.rs | |
| parent | 8767093eb98358a1d62a934a58e1c89c72223cd6 (diff) | |
| download | rust-1de4b65d2a88e88201026485f9622916c5717555.tar.gz rust-1de4b65d2a88e88201026485f9622916c5717555.zip | |
Updates with core::fmt changes
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
Diffstat (limited to 'src/libstd/io/mod.rs')
| -rw-r--r-- | src/libstd/io/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 497213df30f..a043722581b 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -381,9 +381,9 @@ impl IoError { impl fmt::Show for IoError { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - try!(fmt.buf.write_str(self.desc)); + try!(write!(fmt, "{}", self.desc)); match self.detail { - Some(ref s) => write!(fmt.buf, " ({})", *s), + Some(ref s) => write!(fmt, " ({})", *s), None => Ok(()) } } |
