mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-22 03:36:17 +00:00
Cleanup code, fix some incompatibilites with rust head
This commit is contained in:
1 parent
5bce95f3e7
commit
b70d77b5c9
3 files changed
+23
-25
No files matched your search
+14
-14
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user