diff options
| author | topecongiro <seuchida@gmail.com> | 2017-05-19 19:31:29 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-05-23 11:37:33 +0900 |
| commit | 77a2e9858b44598454aa6240475255cd5547d519 (patch) | |
| tree | 254e585d3202349e1a0bacf57eb94fd8da5843e2 /src/items.rs | |
| parent | f2ec5a7bac3f8bdda148307c576f41f2ca005828 (diff) | |
Format source codes
Diffstat (limited to 'src/items.rs')
| -rw-r--r-- | src/items.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/items.rs b/src/items.rs index 953aecb3305..f98cf9507e1 100644 --- a/src/items.rs +++ b/src/items.rs @@ -332,7 +332,7 @@ impl<'a> FmtVisitor<'a> { let suffix = if semicolon_for_expr(e) { ";" } else { "" }; e.rewrite(&self.get_context(), - Shape::indented(self.block_indent, self.config)) + Shape::indented(self.block_indent, self.config)) .map(|s| s + suffix) .or_else(|| Some(self.snippet(e.span))) } @@ -376,7 +376,7 @@ impl<'a> FmtVisitor<'a> { enum_def.variants.is_empty(), self.block_indent, mk_sp(span.lo, body_start)) - .unwrap(); + .unwrap(); self.buffer.push_str(&generics_str); self.last_pos = body_start; @@ -941,7 +941,7 @@ fn format_struct_struct(context: &RewriteContext, |field| field.rewrite(context, Shape::legacy(item_budget, item_indent)), context.codemap.span_after(span, "{"), span.hi) - .collect::<Vec<_>>(); + .collect::<Vec<_>>(); // 1 = , let budget = context.config.max_width() - offset.width() + context.config.tab_spaces() - 1; @@ -1295,7 +1295,7 @@ pub fn rewrite_static(prefix: &str, lhs, expr, Shape::legacy(remaining_width, offset.block_only())) - .map(|s| s + ";") + .map(|s| s + ";") } else { let lhs = format!("{}{};", prefix, ty_str); Some(lhs) |
