From ee6501c81acaac7ad7629d2a602e1f2de9ef724d Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 4 Nov 2014 09:20:18 -0500 Subject: [PATCH] parse_bytes has been removed, use from_str_radix instead see rust-lang/rust#18536 --- src/bigint.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bigint.rs b/src/bigint.rs index a585f55..02bffaa 100644 --- a/src/bigint.rs +++ b/src/bigint.rs @@ -65,6 +65,7 @@ use std::from_str::FromStr; use std::num::CheckedDiv; use std::num::{ToPrimitive, FromPrimitive}; use std::num::{Zero, One, FromStrRadix}; +use std::str; use std::string::String; use std::{uint, i64, u64}; @@ -739,7 +740,9 @@ 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 str::from_utf8(buf.slice(start, end)).and_then(|s| { + FromStrRadix::from_str_radix(s, radix) + }) { Some(d) => { let d: Option = FromPrimitive::from_uint(d); match d {