From ba7844a7fff0061e5b4528c2ecd5adf765145b70 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 14 May 2014 16:55:24 -0700 Subject: Change StrBuf::from_utf8() to return Result This allows the original vector to be recovered in the event that it is not UTF-8. [breaking-change] --- src/libstd/num/strconv.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd/num') diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 4769b17fb2b..63d6219ab8a 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -19,6 +19,7 @@ use num::{Float, FPNaN, FPInfinite, ToPrimitive}; use num; use ops::{Add, Sub, Mul, Div, Rem, Neg}; use option::{None, Option, Some}; +use result::ResultUnwrap; use slice::{CloneableVector, ImmutableVector, MutableVector}; use std::cmp::{Ord, Eq}; use str::{StrAllocating, StrSlice}; -- cgit 1.4.1-3-g733a5