Cleanup code, fix some incompatibilites with rust head

This commit is contained in:
Erick Tryzelaar
2015-02-13 09:40:47 -08:00
parent 5bce95f3e7
commit b70d77b5c9
3 changed files with 23 additions and 25 deletions
+14 -14
View File
@@ -30,20 +30,6 @@ pub trait Visitor {
type Value;
type Error;
fn visit_unit(&mut self) -> Result<Self::Value, Self::Error>;
#[inline]
fn visit_named_unit(&mut self, _name: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
#[inline]
fn visit_enum_unit(&mut self,
_name: &str,
_variant: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
fn visit_bool(&mut self, v: bool) -> Result<Self::Value, Self::Error>;
#[inline]
@@ -109,6 +95,20 @@ pub trait Visitor {
fn visit_str(&mut self, value: &str) -> Result<Self::Value, Self::Error>;
fn visit_unit(&mut self) -> Result<Self::Value, Self::Error>;
#[inline]
fn visit_named_unit(&mut self, _name: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
#[inline]
fn visit_enum_unit(&mut self,
_name: &str,
_variant: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
fn visit_none(&mut self) -> Result<Self::Value, Self::Error>;
fn visit_some<V>(&mut self, value: V) -> Result<Self::Value, Self::Error>