Skip to content

Commit c32f2ec

Browse files
chore: fmt and cleanup
1 parent 4948911 commit c32f2ec

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

src/expr.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,8 @@ pub(crate) fn format_expr(
107107
}
108108
ast::ExprKind::Unary(op, ref subexpr) => rewrite_unary_op(context, op, subexpr, shape),
109109
ast::ExprKind::Struct(ref struct_expr) => {
110-
let ast::StructExpr { ref fields, ref path, ref rest } = **struct_expr;
111-
rewrite_struct_lit(
112-
context,
113-
path,
114-
fields,
115-
rest,
116-
&expr.attrs,
117-
expr.span,
118-
shape,
119-
)
110+
let ast::StructExpr { fields, path, rest } = &**struct_expr;
111+
rewrite_struct_lit(context, path, fields, rest, &expr.attrs, expr.span, shape)
120112
}
121113
ast::ExprKind::Tup(ref items) => {
122114
rewrite_tuple(context, items.iter(), expr.span, shape, items.len() == 1)

src/formatting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashMap;
44
use std::io::{self, Write};
55
use std::time::{Duration, Instant};
66

7-
use rustc_ast::{ast, AstLike};
7+
use rustc_ast::ast;
88
use rustc_span::Span;
99

1010
use self::newline_style::apply_newline_style;

src/patterns.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_ast::ast::{self, BindingMode, PatField, Pat, PatKind, RangeEnd, RangeSyntax};
1+
use rustc_ast::ast::{self, BindingMode, Pat, PatField, PatKind, RangeEnd, RangeSyntax};
22
use rustc_ast::ptr;
33
use rustc_span::{BytePos, Span};
44

0 commit comments

Comments
 (0)