diff options
Diffstat (limited to 'src/libcore/unstable/extfmt.rs')
| -rw-r--r-- | src/libcore/unstable/extfmt.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/unstable/extfmt.rs b/src/libcore/unstable/extfmt.rs index be2aecf0c2a..ad3dce0a749 100644 --- a/src/libcore/unstable/extfmt.rs +++ b/src/libcore/unstable/extfmt.rs @@ -512,7 +512,7 @@ pub mod rt { None } } else { Some('-') }; - unsafe { pad(cv, s, head, PadSigned, buf) }; + pad(cv, s, head, PadSigned, buf); } pub fn conv_uint(cv: Conv, u: uint, buf: &mut ~str) { let prec = get_int_precision(cv); @@ -524,7 +524,7 @@ pub mod rt { TyBits => uint_to_str_prec(u, 2, prec), TyOctal => uint_to_str_prec(u, 8, prec) }; - unsafe { pad(cv, rs, None, PadUnsigned, buf) }; + pad(cv, rs, None, PadUnsigned, buf); } pub fn conv_bool(cv: Conv, b: bool, buf: &mut ~str) { let s = if b { "true" } else { "false" }; @@ -533,7 +533,7 @@ pub mod rt { conv_str(cv, s, buf); } pub fn conv_char(cv: Conv, c: char, buf: &mut ~str) { - unsafe { pad(cv, "", Some(c), PadNozero, buf) }; + pad(cv, "", Some(c), PadNozero, buf); } pub fn conv_str(cv: Conv, s: &str, buf: &mut ~str) { // For strings, precision is the maximum characters @@ -546,14 +546,14 @@ pub mod rt { s } }; - unsafe { pad(cv, unpadded, None, PadNozero, buf) }; + pad(cv, unpadded, None, PadNozero, buf); } pub fn conv_float(cv: Conv, f: float, buf: &mut ~str) { let (to_str, digits) = match cv.precision { CountIs(c) => (float::to_str_exact, c as uint), CountImplied => (float::to_str_digits, 6u) }; - let mut s = unsafe { to_str(f, digits) }; + let mut s = to_str(f, digits); let head = if 0.0 <= f { if have_flag(cv.flags, flag_sign_always) { Some('+') @@ -563,7 +563,7 @@ pub mod rt { None } } else { None }; - unsafe { pad(cv, s, head, PadFloat, buf) }; + pad(cv, s, head, PadFloat, buf); } pub fn conv_poly<T>(cv: Conv, v: &T, buf: &mut ~str) { let s = sys::log_str(v); |
