Skip to content

Commit f3291fb

Browse files
committed
Update to rust master
1 parent aa44b24 commit f3291fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/json.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl StdError for DecoderError {
379379
fn description(&self) -> &str { "decoder error" }
380380
fn cause(&self) -> Option<&StdError> {
381381
match *self {
382-
DecoderError::ParseError(ref e) => Some(e as &StdError),
382+
DecoderError::ParseError(ref e) => Some(e),
383383
_ => None,
384384
}
385385
}
@@ -3844,13 +3844,12 @@ mod tests {
38443844
#[test]
38453845
fn test_encode_hashmap_with_arbitrary_key() {
38463846
use std::collections::HashMap;
3847-
use std::fmt;
38483847
#[derive(PartialEq, Eq, Hash, RustcEncodable)]
38493848
struct ArbitraryType(u32);
38503849
let mut hm: HashMap<ArbitraryType, bool> = HashMap::new();
38513850
hm.insert(ArbitraryType(1), true);
38523851
let mut mem_buf = string::String::new();
3853-
let mut encoder = Encoder::new(&mut mem_buf as &mut fmt::Write);
3852+
let mut encoder = Encoder::new(&mut mem_buf);
38543853
let result = hm.encode(&mut encoder);
38553854
match result.err().unwrap() {
38563855
EncoderError::BadHashmapKey => (),

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
html_root_url = "http://doc.rust-lang.org/rustc-serialize/")]
1717
#![cfg_attr(test, deny(warnings))]
1818
#![cfg_attr(test, feature(test, std_misc))]
19+
#![allow(trivial_numeric_casts)]
1920

2021
#[cfg(test)] extern crate test;
2122
#[cfg(test)] extern crate rand;

0 commit comments

Comments
 (0)