We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ac6af6 + ee6501c commit c0cf374Copy full SHA for c0cf374
src/bigint.rs
@@ -65,6 +65,7 @@ use std::from_str::FromStr;
65
use std::num::CheckedDiv;
66
use std::num::{ToPrimitive, FromPrimitive};
67
use std::num::{Zero, One, FromStrRadix};
68
+use std::str;
69
use std::string::String;
70
use std::{uint, i64, u64};
71
@@ -739,7 +740,9 @@ impl BigUint {
739
740
let mut power: BigUint = One::one();
741
loop {
742
let start = cmp::max(end, unit_len) - unit_len;
- match uint::parse_bytes(buf.slice(start, end), radix) {
743
+ match str::from_utf8(buf.slice(start, end)).and_then(|s| {
744
+ FromStrRadix::from_str_radix(s, radix)
745
+ }) {
746
Some(d) => {
747
let d: Option<BigUint> = FromPrimitive::from_uint(d);
748
match d {
0 commit comments