diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-09-24 23:41:09 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-10-07 15:49:53 +1300 |
| commit | 59976942eacd26c0cc37247c3ac0c78b97edc6ea (patch) | |
| tree | 81df79265eb8601f2965303b9626b80ee728208f /src/libnum | |
| parent | b5ba2f5517b1f90d07969ca3facdf5132e42436c (diff) | |
| download | rust-59976942eacd26c0cc37247c3ac0c78b97edc6ea.tar.gz rust-59976942eacd26c0cc37247c3ac0c78b97edc6ea.zip | |
Use slice syntax instead of slice_to, etc.
Diffstat (limited to 'src/libnum')
| -rw-r--r-- | src/libnum/bigint.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnum/bigint.rs b/src/libnum/bigint.rs index 82d320d5702..af2ff747fe9 100644 --- a/src/libnum/bigint.rs +++ b/src/libnum/bigint.rs @@ -738,7 +738,7 @@ impl BigUint { let mut power: BigUint = One::one(); loop { let start = cmp::max(end, unit_len) - unit_len; - match uint::parse_bytes(buf.slice(start, end), radix) { + match uint::parse_bytes(buf[start..end], radix) { Some(d) => { let d: Option<BigUint> = FromPrimitive::from_uint(d); match d { @@ -1409,7 +1409,7 @@ impl BigInt { sign = Minus; start = 1; } - return BigUint::parse_bytes(buf.slice(start, buf.len()), radix) + return BigUint::parse_bytes(buf[start..], radix) .map(|bu| BigInt::from_biguint(sign, bu)); } |
