diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-11-20 14:17:12 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-11-26 08:23:57 -0800 |
| commit | 1eca34de7dd55719cd83153994e5caf2027f62a2 (patch) | |
| tree | 14ba2903a9ead6e569d08a33c9ebfc2c6ba07e9e /src/libstd/num | |
| parent | 6801bc8f552ce740deb60212903ba43de197689c (diff) | |
| download | rust-1eca34de7dd55719cd83153994e5caf2027f62a2.tar.gz rust-1eca34de7dd55719cd83153994e5caf2027f62a2.zip | |
libstd: Remove all non-`proc` uses of `do` from libstd
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/int_macros.rs | 8 | ||||
| -rw-r--r-- | src/libstd/num/uint_macros.rs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs index 9141e87bd72..fc56bf91c2a 100644 --- a/src/libstd/num/int_macros.rs +++ b/src/libstd/num/int_macros.rs @@ -420,10 +420,10 @@ pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U { // base 2 number, and then we need another for a possible '-' character. let mut buf = [0u8, ..65]; let mut cur = 0; - do strconv::int_to_str_bytes_common(n, radix, strconv::SignNeg) |i| { + strconv::int_to_str_bytes_common(n, radix, strconv::SignNeg, |i| { buf[cur] = i; cur += 1; - } + }); f(buf.slice(0, cur)) } @@ -440,9 +440,9 @@ impl ToStrRadix for $T { #[inline] fn to_str_radix(&self, radix: uint) -> ~str { let mut buf: ~[u8] = ~[]; - do strconv::int_to_str_bytes_common(*self, radix, strconv::SignNeg) |i| { + strconv::int_to_str_bytes_common(*self, radix, strconv::SignNeg, |i| { buf.push(i); - } + }); // We know we generated valid utf-8, so we don't need to go through that // check. unsafe { str::raw::from_utf8_owned(buf) } diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs index 49f270369f7..3c276378df8 100644 --- a/src/libstd/num/uint_macros.rs +++ b/src/libstd/num/uint_macros.rs @@ -271,10 +271,10 @@ pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U { // base 2 number. let mut buf = [0u8, ..64]; let mut cur = 0; - do strconv::int_to_str_bytes_common(n, radix, strconv::SignNone) |i| { + strconv::int_to_str_bytes_common(n, radix, strconv::SignNone, |i| { buf[cur] = i; cur += 1; - } + }); f(buf.slice(0, cur)) } @@ -291,9 +291,9 @@ impl ToStrRadix for $T { #[inline] fn to_str_radix(&self, radix: uint) -> ~str { let mut buf = ~[]; - do strconv::int_to_str_bytes_common(*self, radix, strconv::SignNone) |i| { + strconv::int_to_str_bytes_common(*self, radix, strconv::SignNone, |i| { buf.push(i); - } + }); // We know we generated valid utf-8, so we don't need to go through that // check. unsafe { str::raw::from_utf8_owned(buf) } |
