Format with rustfmt 2018-12-10

This commit is contained in:
David Tolnay
2019-02-01 21:02:57 -08:00
parent 3a097ff2d2
commit fa854a2108
7 changed files with 51 additions and 31 deletions
+4 -2
View File
@@ -116,8 +116,10 @@ impl<'c, T> VecAttr<'c, T> {
fn at_most_one(mut self) -> Result<Option<T>, ()> {
if self.values.len() > 1 {
let dup_token = self.first_dup_tokens;
self.cx
.error_spanned_by(dup_token, format!("duplicate serde attribute `{}`", self.name));
self.cx.error_spanned_by(
dup_token,
format!("duplicate serde attribute `{}`", self.name),
);
Err(())
} else {
Ok(self.values.pop())