diff options
| author | Caleb Cartwright <caleb.cartwright@outlook.com> | 2021-03-28 17:30:53 -0500 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2021-04-02 23:21:06 -0500 |
| commit | c32f2ec0153d364041eb0f7267210741ce7ca275 (patch) | |
| tree | 1a5f9a756dbbe43649f94b053f86e41d0264b678 | |
| parent | 49489116081f2a90ef2f51f04cf0048fbc1504a7 (diff) | |
| download | rust-c32f2ec0153d364041eb0f7267210741ce7ca275.tar.gz rust-c32f2ec0153d364041eb0f7267210741ce7ca275.zip | |
chore: fmt and cleanup
| -rw-r--r-- | src/expr.rs | 12 | ||||
| -rw-r--r-- | src/formatting.rs | 2 | ||||
| -rw-r--r-- | src/patterns.rs | 2 |
3 files changed, 4 insertions, 12 deletions
diff --git a/src/expr.rs b/src/expr.rs index 1befea9c805..d3fd22653b4 100644 --- a/src/expr.rs +++ b/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) diff --git a/src/formatting.rs b/src/formatting.rs index caf24476e61..b69ecdc5cb8 100644 --- a/src/formatting.rs +++ b/src/formatting.rs @@ -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; diff --git a/src/patterns.rs b/src/patterns.rs index 5d43d169d60..6824fc661ba 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -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}; |
