diff options
| author | sinkuu <sinkuu@sinkuu.xyz> | 2017-08-12 17:01:46 +0900 |
|---|---|---|
| committer | sinkuu <sinkuu@sinkuu.xyz> | 2017-08-12 18:28:28 +0900 |
| commit | f9ee060eae6324a15f90e772b3db4d71f4141a6f (patch) | |
| tree | 3a400cfbec7e7886986dbf79e7b64c52189b028b | |
| parent | 955b25625d2f925261661a8fd7abfc322186886b (diff) | |
Use utils::inner_attributes
| -rw-r--r-- | src/visitor.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/visitor.rs b/src/visitor.rs index 8c911465722..6faaf8805b3 100644 --- a/src/visitor.rs +++ b/src/visitor.rs @@ -136,10 +136,8 @@ impl<'a> FmtVisitor<'a> { if let Some(first_stmt) = b.stmts.first() { let attr_lo = inner_attrs .and_then(|attrs| { - attrs - .iter() - .filter(|a| a.style == ast::AttrStyle::Inner) - .nth(0) + utils::inner_attributes(attrs) + .first() .map(|attr| attr.span.lo) }) .or_else(|| { |
