Skip to content

Commit

Permalink
Rustfmt: set overflow_delimited_expr = true
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 10, 2020
1 parent b129ea7 commit fe48253
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
overflow_delimited_expr = true
11 changes: 4 additions & 7 deletions syntax/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ pub struct Parser<'a> {

pub(super) fn parse_doc(attrs: &[Attribute]) -> Result<Doc> {
let mut doc = Doc::new();
parse(
attrs,
Parser {
doc: Some(&mut doc),
..Parser::default()
},
)?;
parse(attrs, Parser {
doc: Some(&mut doc),
..Parser::default()
})?;
Ok(doc)
}

Expand Down
11 changes: 4 additions & 7 deletions syntax/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,10 @@ fn parse_struct(item: ItemStruct) -> Result<Api> {

let mut doc = Doc::new();
let mut derives = Vec::new();
attrs::parse(
&item.attrs,
attrs::Parser {
doc: Some(&mut doc),
derives: Some(&mut derives),
},
)?;
attrs::parse(&item.attrs, attrs::Parser {
doc: Some(&mut doc),
derives: Some(&mut derives),
})?;

let fields = match item.fields {
Fields::Named(fields) => fields,
Expand Down

0 comments on commit fe48253

Please sign in to comment.