about summary refs log tree commit diff
path: root/src/libcore/fmt/float.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-11 11:14:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-15 23:22:15 -0700
commit2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f (patch)
treee4bebf36fa24fe0fe4dd6846291c59520ef1be28 /src/libcore/fmt/float.rs
parentd12a136b2247ab5cf5b32e44a890b3a871c0ce90 (diff)
downloadrust-2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f.tar.gz
rust-2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f.zip
core: Update all tests for fmt movement
Diffstat (limited to 'src/libcore/fmt/float.rs')
-rw-r--r--src/libcore/fmt/float.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index e389775ce4c..e5fb148aded 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -352,8 +352,16 @@ pub fn float_to_str_bytes_common<T: Primitive + Float, U>(
 
             let mut filler = Filler { buf: buf, end: &mut end };
             match sign {
-                SignNeg => { let _ = write!(&mut filler, "{:-}", exp); }
-                SignNone | SignAll => { let _ = write!(&mut filler, "{}", exp); }
+                SignNeg => {
+                    let _ = format_args!(|args| {
+                        fmt::write(&mut filler, args)
+                    }, "{:-}", exp);
+                }
+                SignNone | SignAll => {
+                    let _ = format_args!(|args| {
+                        fmt::write(&mut filler, args)
+                    }, "{}", exp);
+                }
             }
         }
     }