diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-06-24 20:18:18 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-06-25 12:48:39 -0700 |
| commit | fad307d7b4aa5e7ff6cf30194b069062aaad1a89 (patch) | |
| tree | 0742208560aea9aad32391f4399d5a401a9a1c8b /src/libcore/extfmt.rs | |
| parent | 3ba7ca5c9f103e17d98b4bd0d6d86e7a7c43366d (diff) | |
core: Convert declarations to not use the trailing 'unsafe' notation
Diffstat (limited to 'src/libcore/extfmt.rs')
| -rw-r--r-- | src/libcore/extfmt.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index 144ea571d7c..175974f09cb 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -81,7 +81,7 @@ mod ct { enum piece { piece_string(str), piece_conv(conv), } type error_fn = fn@(str) -> ! ; - fn parse_fmt_string(s: str, error: error_fn) -> [piece] unsafe { + fn parse_fmt_string(s: str, error: error_fn) -> [piece] { let mut pieces: [piece] = []; let lim = str::len(s); let mut buf = ""; @@ -225,7 +225,7 @@ mod ct { } else { {count: count_implied, next: i} }; } fn parse_type(s: str, i: uint, lim: uint, error: error_fn) -> - {ty: ty, next: uint} unsafe { + {ty: ty, next: uint} { if i >= lim { error("missing type in conversion"); } let tstr = str::slice(s, i, i+1u); // TODO: Do we really want two signed types here? @@ -314,7 +314,7 @@ mod rt { let mut s = str::from_char(c); ret pad(cv, s, pad_nozero); } - fn conv_str(cv: conv, s: str) -> str unsafe { + fn conv_str(cv: conv, s: str) -> str { // For strings, precision is the maximum characters // displayed let mut unpadded = alt cv.precision { @@ -378,7 +378,7 @@ mod rt { }; } enum pad_mode { pad_signed, pad_unsigned, pad_nozero, pad_float } - fn pad(cv: conv, &s: str, mode: pad_mode) -> str unsafe { + fn pad(cv: conv, &s: str, mode: pad_mode) -> str { let uwidth : uint = alt cv.width { count_implied { ret s; } count_is(width) { |
