mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 01:48:00 +00:00
Update to latest rust master
This commit is contained in:
@@ -251,7 +251,7 @@ pub trait Deserializer<E>: Iterator<Result<Token, E>> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn expect_num<T: NumCast>(&mut self, token: Token) -> Result<T, E> {
|
||||
fn expect_num<T: num::NumCast>(&mut self, token: Token) -> Result<T, E> {
|
||||
match token {
|
||||
Int(x) => to_result!(num::cast(x), self.syntax_error(token, PRIMITIVE_TOKEN_KINDS)),
|
||||
I8(x) => to_result!(num::cast(x), self.syntax_error(token, PRIMITIVE_TOKEN_KINDS)),
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
use std::str;
|
||||
use std::num;
|
||||
use std::num::Float;
|
||||
use std::str::ScalarValue;
|
||||
use std::char;
|
||||
|
||||
@@ -286,7 +286,7 @@ impl<Iter: Iterator<u8>> Parser<Iter> {
|
||||
}
|
||||
}
|
||||
|
||||
let exp: f64 = num::pow(10u as f64, exp);
|
||||
let exp: f64 = 10_f64.powi(exp as i32);
|
||||
if neg_exp {
|
||||
res /= exp;
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
use std::f32;
|
||||
use std::f64;
|
||||
use std::num::{FPNaN, FPInfinite};
|
||||
use std::num::{Float, FPNaN, FPInfinite};
|
||||
use std::io::{IoError, IoResult, MemWriter};
|
||||
|
||||
use ser::Serialize;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
use std::collections::{HashMap, TreeMap, tree_map};
|
||||
use std::fmt;
|
||||
use std::io::{AsRefWriter, IoResult, MemWriter};
|
||||
use std::io::{ByRefWriter, IoResult, MemWriter};
|
||||
use std::io;
|
||||
use std::str;
|
||||
use std::string;
|
||||
|
||||
Reference in New Issue
Block a user