diff options
author | Sam Scott <sam@osohq.com> | 2020-06-03 10:29:01 -0400 |
---|---|---|
committer | Sam Scott <sam@osohq.com> | 2020-06-03 10:29:01 -0400 |
commit | 165e6c903ef40a958dae6ff59bf2d50085f349b9 (patch) | |
tree | 1a6c155cb23ee04d149ed742ae1b1a710dc7cac6 /examples | |
parent | 77cb6730f9265591dad141f4f9b840069c9cd2b9 (diff) |
Revert to rustfmt defaults.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/csv_vectors.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/examples/csv_vectors.rs b/examples/csv_vectors.rs index 4dbc947..c193c64 100644 --- a/examples/csv_vectors.rs +++ b/examples/csv_vectors.rs @@ -41,10 +41,7 @@ impl<T: DeserializeOwned> Default for CSVVecVisitor<T> { impl<'de, T: DeserializeOwned> serde::de::Visitor<'de> for CSVVecVisitor<T> { type Value = Vec<T>; - 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") } @@ -55,12 +52,8 @@ impl<'de, T: DeserializeOwned> serde::de::Visitor<'de> for CSVVecVisitor<T> { let mut output = Vec::new(); let mut items = csv::Reader::from_reader(s.as_bytes()); for res in items.deserialize() { - let item: T = res.map_err(|e| { - E::custom(format!( - "could not deserialize sequence value: {:?}", - e - )) - })?; + let item: T = res + .map_err(|e| E::custom(format!("could not deserialize sequence value: {:?}", e)))?; output.push(item); } |