Cleanup indentation

This commit is contained in:
avitex 2019-01-21 16:34:45 +11:00
parent 8eeca29ff7
commit df49d04d19
3 changed files with 10 additions and 10 deletions

View File

@ -42,7 +42,7 @@ impl<'de, R> Deserializer<'de> for &mut BaseDeserializer<R>
{ {
type Error = R::Error; type Error = R::Error;
// fn deserialize_str(self) -> Result<&'de str, Self::Error> { // fn deserialize_str(self) -> Result<&'de str, Self::Error> {
// } // }
} }

View File

@ -6,12 +6,12 @@ pub enum DeserializerError {
} }
impl fmt::Debug for DeserializerError { impl fmt::Debug for DeserializerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use DeserializerError::*; use DeserializerError::*;
match self { match self {
Unexpected(ref err) => write!(f, "unexpected error: {}", err) Unexpected(ref err) => write!(f, "unexpected error: {}", err)
} }
} }
} }
pub trait Error: fmt::Debug + From<DeserializerError> {} pub trait Error: fmt::Debug + From<DeserializerError> {}

View File

@ -24,15 +24,15 @@ pub trait Deserialize: Sized {
} }
// pub trait Unit { // pub trait Unit {
// fn from_name_value<T, E>(name: &str, value: T) -> Result<T, E> // fn from_name_value<T, E>(name: &str, value: T) -> Result<T, E>
// where // where
// T: Deserialize, // T: Deserialize,
// E: Error; // E: Error;
// } // }
// pub enum MaybeUnit<'a, T> { // pub enum MaybeUnit<'a, T> {
// Raw(T), // Raw(T),
// Wrapped(&'a str, T) // Wrapped(&'a str, T)
// } // }
pub trait Deserializer<'de> { pub trait Deserializer<'de> {
@ -47,6 +47,6 @@ pub trait Deserializer<'de> {
//fn deserialize_str(self) -> Result<&'de str, Self::Error>; //fn deserialize_str(self) -> Result<&'de str, Self::Error>;
//fn deserialize_unit<U>(self) -> Result<U, Self::Error> //fn deserialize_unit<U>(self) -> Result<U, Self::Error>
// where U: Unit; // where U: Unit;
//fn deserialize_maybe_unit(self) -> Result<MaybeUnit, Self::Error>; //fn deserialize_maybe_unit(self) -> Result<MaybeUnit, Self::Error>;
} }