diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-11 11:14:14 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-15 23:22:15 -0700 |
| commit | 2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f (patch) | |
| tree | e4bebf36fa24fe0fe4dd6846291c59520ef1be28 /src/libcore/fmt/float.rs | |
| parent | d12a136b2247ab5cf5b32e44a890b3a871c0ce90 (diff) | |
| download | rust-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.rs | 12 |
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); + } } } } |
