From 8e5cf19e0740afabf8f8254441e88c756240fcb1 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Fri, 27 Jan 2017 22:56:04 +0100 Subject: Reformat with rustfmt --- src/de.rs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/de.rs') diff --git a/src/de.rs b/src/de.rs index 0f3cb78..42c1f04 100644 --- a/src/de.rs +++ b/src/de.rs @@ -1,13 +1,13 @@ //! Deserialization support for the `application/x-www-form-urlencoded` format. use serde::de; + +pub use serde::de::value::Error; use serde::de::value::MapDeserializer; use std::borrow::Cow; use url::form_urlencoded::Parse as UrlEncodedParse; use url::form_urlencoded::parse; -pub use serde::de::value::Error; - /// Deserializes a `application/x-wwww-url-encoded` value from a `&[u8]`. /// /// ``` @@ -56,8 +56,10 @@ pub fn from_str(input: &str) -> Result { /// * Everything else but `deserialize_seq` and `deserialize_seq_fixed_size` /// defers to `deserialize`. pub struct Deserializer<'a> { - inner: - MapDeserializer, Cow<'a, str>, Cow<'a, str>, Error>, + inner: MapDeserializer, + Cow<'a, str>, + Cow<'a, str>, + Error>, } impl<'a> Deserializer<'a> { @@ -67,38 +69,36 @@ impl<'a> Deserializer<'a> { } } -impl<'a> de::Deserializer for Deserializer<'a> -{ +impl<'a> de::Deserializer for Deserializer<'a> { type Error = Error; - fn deserialize( - &mut self, visitor: V) - -> Result + fn deserialize(&mut self, visitor: V) -> Result where V: de::Visitor, { self.deserialize_map(visitor) } - fn deserialize_map( - &mut self, mut visitor: V) - -> Result + fn deserialize_map(&mut self, + mut visitor: V) + -> Result where V: de::Visitor, { visitor.visit_map(&mut self.inner) } - fn deserialize_seq( - &mut self, mut visitor: V) - -> Result + fn deserialize_seq(&mut self, + mut visitor: V) + -> Result where V: de::Visitor, { visitor.visit_seq(&mut self.inner) } - fn deserialize_seq_fixed_size( - &mut self, _len: usize, mut visitor: V) - -> Result - where V: de::Visitor + fn deserialize_seq_fixed_size(&mut self, + _len: usize, + mut visitor: V) + -> Result + where V: de::Visitor, { visitor.visit_seq(&mut self.inner) } -- cgit v1.2.3