mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-25 13:05:08 +00:00
Fix: String::from_utf8 became stable and changed signature
This commit is contained in:
1 parent
ae665a1c05
commit
814c0570b8
2 files changed
+5
-5
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use std::f64;
|
||||
use std::io::{mod, ByRefWriter, IoError};
|
||||
use std::num::{Float, FpCategory};
|
||||
use std::str::Utf8Error;
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
use ser;
|
||||
use ser::Serializer;
|
||||
@@ -252,7 +252,7 @@ pub fn to_vec<
|
||||
#[inline]
|
||||
pub fn to_string<
|
||||
T: ser::Serialize,
|
||||
>(value: &T) -> Result<Result<String, (Vec<u8>, Utf8Error)>, IoError> {
|
||||
>(value: &T) -> Result<Result<String, FromUtf8Error>, IoError> {
|
||||
let vec = try!(to_vec(value));
|
||||
Ok(String::from_utf8(vec))
|
||||
}
|
||||
Reference in new issue
Block a user