diff options
| author | Nick Cameron <nrc@ncameron.org> | 2015-10-18 15:19:32 +1300 |
|---|---|---|
| committer | Nick Cameron <nrc@ncameron.org> | 2015-10-18 15:19:32 +1300 |
| commit | d7019ce8976ef1657ff47d021ffc7e31ddadbfe6 (patch) | |
| tree | d54caf81d6b6a390c4d178a62fe6f98a95f4ff1a /src | |
| parent | 51afb3ed106823bd972ff21136787070642d4104 (diff) | |
| parent | 5407202fdf357e4acfe0d06c0ade9662d0eaad5f (diff) | |
Merge pull request #474 from marcusklaas/fn-indent
Properly indent pub fns in extern blocks
Diffstat (limited to 'src')
| -rw-r--r-- | src/expr.rs | 2 | ||||
| -rw-r--r-- | src/items.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/expr.rs b/src/expr.rs index 0b64ecf35ff..3467b38c1a4 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -273,7 +273,7 @@ pub fn rewrite_array<'a, I>(expr_iter: I, let has_long_item = try_opt!(items.iter() .map(|li| li.item.as_ref().map(|s| s.len() > 10)) .fold(Some(false), - |acc, x| acc.and_then(|y| x.map(|x| (x || y))))); + |acc, x| acc.and_then(|y| x.map(|x| x || y)))); let tactic = if has_long_item || items.iter().any(ListItem::is_multiline) { definitive_tactic(&items, ListTactic::HorizontalVertical, max_item_width) diff --git a/src/items.rs b/src/items.rs index 18b9118532c..49da3e5886f 100644 --- a/src/items.rs +++ b/src/items.rs @@ -143,14 +143,13 @@ impl<'a> FmtVisitor<'a> { // These are not actually rust functions, // but we format them as such. abi::Abi::Rust, - ast::Visibility::Inherited, + item.vis, span, false, false); match rewrite { Some((new_fn, _)) => { - self.buffer.push_str(format_visibility(item.vis)); self.buffer.push_str(&new_fn); self.buffer.push_str(";"); } |
