Get everything to compile and fix some warnings
This commit is contained in:
parent
1552eb72dc
commit
33633a5e14
@ -1,8 +1,6 @@
|
||||
#![feature(plugin, io)]
|
||||
#![feature(collections, core, io, plugin, test)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[plugin]
|
||||
extern crate serde2_macros;
|
||||
#![plugin(serde2_macros)]
|
||||
|
||||
extern crate serde2;
|
||||
extern crate "rustc-serialize" as rustc_serialize;
|
||||
|
@ -728,12 +728,17 @@ mod tests {
|
||||
enum Error {
|
||||
SyntaxError,
|
||||
EndOfStreamError,
|
||||
MissingFieldError(&'static str),
|
||||
}
|
||||
|
||||
impl super::Error for Error {
|
||||
fn syntax_error() -> Error { Error::SyntaxError }
|
||||
|
||||
fn end_of_stream_error() -> Error { Error::EndOfStreamError }
|
||||
|
||||
fn missing_field_error(field: &'static str) -> Error {
|
||||
Error::MissingFieldError(field)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Deserializer for TokenDeserializer<'a> {
|
||||
@ -1183,11 +1188,11 @@ mod tests {
|
||||
|
||||
fn visit_enum<
|
||||
V: super::EnumVisitor,
|
||||
>(&mut self, name: &str, variant: &str, mut visitor: V) -> Result<Enum, V::Error> {
|
||||
>(&mut self, name: &str, variant: &str, visitor: V) -> Result<Enum, V::Error> {
|
||||
if name == "Enum" {
|
||||
self.visit_variant(variant, visitor)
|
||||
} else {
|
||||
Err(super::Error::syntax_error());
|
||||
Err(super::Error::syntax_error())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ impl error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
match *self {
|
||||
Error::SyntaxError(..) => "syntax error",
|
||||
Error::IoError(ref error) => error.description().as_slice(),
|
||||
Error::IoError(ref error) => error.description(),
|
||||
/*
|
||||
Error::ExpectedError(ref expected, _) => &expected,
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(io)]
|
||||
#![feature(core, io, std_misc, unicode)]
|
||||
|
||||
extern crate unicode;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user