about summary refs log tree commit diff
path: root/src/libstd/fmt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-10-18 15:16:18 -0700
committerBrian Anderson <banderson@mozilla.com>2013-10-21 11:59:23 -0700
commit3675e42334e9e58ae16446f52b2c6c951e8e1628 (patch)
tree326bfd074994ac7fe42f59473a9824882df4f9dc /src/libstd/fmt
parentcf7b9eb51f10fc0b27164c27a30600f80927a1d3 (diff)
downloadrust-3675e42334e9e58ae16446f52b2c6c951e8e1628.tar.gz
rust-3675e42334e9e58ae16446f52b2c6c951e8e1628.zip
std: Move sys::log_str to repr::repr_to_str. Further work on #2240.
Diffstat (limited to 'src/libstd/fmt')
-rw-r--r--src/libstd/fmt/mod.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs
index 3223ca9a731..e7fa81fc87a 100644
--- a/src/libstd/fmt/mod.rs
+++ b/src/libstd/fmt/mod.rs
@@ -466,7 +466,7 @@ use rt::io::Decorator;
 use rt::io::mem::MemWriter;
 use rt::io;
 use str;
-use sys;
+use repr;
 use util;
 use vec;
 
@@ -1087,17 +1087,13 @@ impl<T> Poly for T {
     fn fmt(t: &T, f: &mut Formatter) {
         match (f.width, f.precision) {
             (None, None) => {
-                // XXX: sys::log_str should have a variant which takes a stream
-                //      and we should directly call that (avoids unnecessary
-                //      allocations)
-                let s = sys::log_str(t);
-                f.buf.write(s.as_bytes());
+                repr::write_repr(f.buf, t);
             }
 
             // If we have a specified width for formatting, then we have to make
             // this allocation of a new string
             _ => {
-                let s = sys::log_str(t);
+                let s = repr::repr_to_str(t);
                 f.pad(s);
             }
         }