diff options
| author | Nick Cameron <nrc@ncameron.org> | 2018-10-16 09:09:56 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-16 09:09:56 +1300 |
| commit | c09d7ef08843e2b23e38462ce8e6e1b07559d6d3 (patch) | |
| tree | b61762adaab4ce45aba463125859b067a8bddbf0 /src/expr.rs | |
| parent | 5f02be6294cdef448366297065a26c268249f40b (diff) | |
| parent | e64a6d371b498ad2187ec4937c144b1bf83d0659 (diff) | |
Merge pull request #3106 from sinkuu/clippy
Clippy and cleanups
Diffstat (limited to 'src/expr.rs')
| -rw-r--r-- | src/expr.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/expr.rs b/src/expr.rs index 82d2a43ad07..15ffb842ee4 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1816,12 +1816,7 @@ fn rewrite_unary_op( shape: Shape, ) -> Option<String> { // For some reason, an UnOp is not spanned like BinOp! - let operator_str = match op { - ast::UnOp::Deref => "*", - ast::UnOp::Not => "!", - ast::UnOp::Neg => "-", - }; - rewrite_unary_prefix(context, operator_str, expr, shape) + rewrite_unary_prefix(context, ast::UnOp::to_string(op), expr, shape) } fn rewrite_assignment( |
