about summary refs log tree commit diff
path: root/src/libcore/unstable/extfmt.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-04-09 01:31:23 -0400
committerAlex Crichton <alex@alexcrichton.com>2013-04-14 01:15:46 -0400
commitd9595d1737677dd61d9f52f674c34f13d708e39c (patch)
tree304855240a098090a217dc325c4ca377b31d9ba2 /src/libcore/unstable/extfmt.rs
parent4bfa3c6663ad6facdbdb8bd533442b050085f753 (diff)
downloadrust-d9595d1737677dd61d9f52f674c34f13d708e39c.tar.gz
rust-d9595d1737677dd61d9f52f674c34f13d708e39c.zip
core: remove unnecessary unsafe blocks/functions
Diffstat (limited to 'src/libcore/unstable/extfmt.rs')
-rw-r--r--src/libcore/unstable/extfmt.rs12
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);