diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/fmt/float.rs | 2 | ||||
| -rw-r--r-- | src/libcore/fmt/mod.rs | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs index 25bb959b9b3..56b2c2a7983 100644 --- a/src/libcore/fmt/float.rs +++ b/src/libcore/fmt/float.rs @@ -314,7 +314,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>( end: &'a mut uint, } - impl<'a> fmt::Writer for Filler<'a> { + impl<'a> fmt::Write for Filler<'a> { fn write_str(&mut self, s: &str) -> fmt::Result { slice::bytes::copy_memory(&mut self.buf[(*self.end)..], s.as_bytes()); diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index f940300a269..09733df3539 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -57,14 +57,14 @@ pub struct Error; /// A collection of methods that are required to format a message into a stream. /// /// This trait is the type which this modules requires when formatting -/// information. This is similar to the standard library's `io::Writer` trait, +/// information. This is similar to the standard library's `io::Write` trait, /// but it is only intended for use in libcore. /// /// This trait should generally not be implemented by consumers of the standard -/// library. The `write!` macro accepts an instance of `io::Writer`, and the -/// `io::Writer` trait is favored over implementing this trait. +/// library. The `write!` macro accepts an instance of `io::Write`, and the +/// `io::Write` trait is favored over implementing this trait. #[stable(feature = "rust1", since = "1.0.0")] -pub trait Writer { +pub trait Write { /// Writes a slice of bytes into this writer, returning whether the write /// succeeded. /// @@ -85,12 +85,12 @@ pub trait Writer { #[stable(feature = "rust1", since = "1.0.0")] fn write_fmt(&mut self, args: Arguments) -> Result { // This Adapter is needed to allow `self` (of type `&mut - // Self`) to be cast to a FormatWriter (below) without + // Self`) to be cast to a Write (below) without // requiring a `Sized` bound. struct Adapter<'a,T: ?Sized +'a>(&'a mut T); - impl<'a, T: ?Sized> Writer for Adapter<'a, T> - where T: Writer + impl<'a, T: ?Sized> Write for Adapter<'a, T> + where T: Write { fn write_str(&mut self, s: &str) -> Result { self.0.write_str(s) @@ -116,7 +116,7 @@ pub struct Formatter<'a> { width: Option<uint>, precision: Option<uint>, - buf: &'a mut (Writer+'a), + buf: &'a mut (Write+'a), curarg: slice::Iter<'a, ArgumentV1<'a>>, args: &'a [ArgumentV1<'a>], } @@ -367,7 +367,7 @@ pub trait UpperExp { /// * output - the buffer to write output to /// * args - the precompiled arguments generated by `format_args!` #[stable(feature = "rust1", since = "1.0.0")] -pub fn write(output: &mut Writer, args: Arguments) -> Result { +pub fn write(output: &mut Write, args: Arguments) -> Result { let mut formatter = Formatter { flags: 0, width: None, |
