diff options
author | Sam Scott <sam.scott89@gmail.com> | 2017-03-12 14:44:44 -0400 |
---|---|---|
committer | Sam Scott <sam.scott89@gmail.com> | 2017-03-12 14:44:44 -0400 |
commit | bccdce1a3ac0dc0646f4ffa9bc0a09ea19ae58a5 (patch) | |
tree | 365d4561f44407720f24ec84690611096807c040 /examples/csv_vectors.rs | |
parent | 317b8b17f3e3656cdc64fc6435889d005aa9a8af (diff) |
Run rustfmt on code.
Diffstat (limited to 'examples/csv_vectors.rs')
-rw-r--r-- | examples/csv_vectors.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/csv_vectors.rs b/examples/csv_vectors.rs index 95e4398..39e95a1 100644 --- a/examples/csv_vectors.rs +++ b/examples/csv_vectors.rs @@ -19,7 +19,7 @@ fn main() { fn from_csv<D>(deserializer: D) -> Result<Vec<u8>, D::Error> - where D: serde::Deserializer + where D: serde::Deserializer, { deserializer.deserialize_str(CSVVecVisitor) } @@ -30,12 +30,14 @@ struct CSVVecVisitor; impl serde::de::Visitor for CSVVecVisitor { type Value = Vec<u8>; - fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + fn expecting(&self, + formatter: &mut std::fmt::Formatter) + -> std::fmt::Result { write!(formatter, "a str") } fn visit_str<E>(self, s: &str) -> std::result::Result<Self::Value, E> - where E: serde::de::Error + where E: serde::de::Error, { let mut output = Vec::new(); let mut items = csv::Reader::from_string(s); @@ -46,6 +48,4 @@ impl serde::de::Visitor for CSVVecVisitor { Ok(output) } - - } |