1
Fork 0

Format vec! macro using brackets

This commit is contained in:
Marcus Klaas 2015-10-16 22:54:32 +02:00
parent 00aa232834
commit a9bd695723
5 changed files with 43 additions and 19 deletions

View file

@ -35,7 +35,7 @@ impl Rewrite for ast::Expr {
match self.node {
ast::Expr_::ExprVec(ref expr_vec) => {
rewrite_array(expr_vec.iter().map(|e| &**e),
self.span,
mk_sp(span_after(self.span, "[", context.codemap), self.span.hi),
context,
width,
offset)
@ -266,7 +266,7 @@ pub fn rewrite_array<'a, I>(expr_iter: I,
|item| item.span.hi,
// 1 = [
|item| item.rewrite(&inner_context, max_item_width, offset),
span_after(span, "[", context.codemap),
span.lo,
span.hi)
.collect::<Vec<_>>();