chore: fmt and cleanup
This commit is contained in:
parent
4948911608
commit
c32f2ec015
12
src/expr.rs
12
src/expr.rs
@ -107,16 +107,8 @@ pub(crate) fn format_expr(
|
||||
}
|
||||
ast::ExprKind::Unary(op, ref subexpr) => rewrite_unary_op(context, op, subexpr, shape),
|
||||
ast::ExprKind::Struct(ref struct_expr) => {
|
||||
let ast::StructExpr { ref fields, ref path, ref rest } = **struct_expr;
|
||||
rewrite_struct_lit(
|
||||
context,
|
||||
path,
|
||||
fields,
|
||||
rest,
|
||||
&expr.attrs,
|
||||
expr.span,
|
||||
shape,
|
||||
)
|
||||
let ast::StructExpr { fields, path, rest } = &**struct_expr;
|
||||
rewrite_struct_lit(context, path, fields, rest, &expr.attrs, expr.span, shape)
|
||||
}
|
||||
ast::ExprKind::Tup(ref items) => {
|
||||
rewrite_tuple(context, items.iter(), expr.span, shape, items.len() == 1)
|
||||
|
@ -4,7 +4,7 @@ use std::collections::HashMap;
|
||||
use std::io::{self, Write};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use rustc_ast::{ast, AstLike};
|
||||
use rustc_ast::ast;
|
||||
use rustc_span::Span;
|
||||
|
||||
use self::newline_style::apply_newline_style;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use rustc_ast::ast::{self, BindingMode, PatField, Pat, PatKind, RangeEnd, RangeSyntax};
|
||||
use rustc_ast::ast::{self, BindingMode, Pat, PatField, PatKind, RangeEnd, RangeSyntax};
|
||||
use rustc_ast::ptr;
|
||||
use rustc_span::{BytePos, Span};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user