about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-17 15:52:01 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-17 17:33:20 +0530
commitbf52f2eef578e6fff83611a6276a3aa9f284e1c5 (patch)
treeb8dbe9baff53cc9def4e2a78fdd9d8b96a585a30 /src/libcore
parent4647d89205992383f8122e8fde0e2615497572bc (diff)
parentbc9084b9b7f21140ffbc051ecb2a0cd08e88f3bb (diff)
downloadrust-bf52f2eef578e6fff83611a6276a3aa9f284e1c5.tar.gz
rust-bf52f2eef578e6fff83611a6276a3aa9f284e1c5.zip
Rollup merge of #22311 - lfairy:consistent-fmt, r=alexcrichton
 This brings it in line with its namesake in `std::io`.

[breaking-change]

r? @aturon
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/fmt/float.rs2
-rw-r--r--src/libcore/fmt/mod.rs18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index 8e09e52daee..7f7264a0468 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 edb4160f08c..67c8c9fec09 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>],
 }
@@ -368,7 +368,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,