Use UnOp::to_string
This commit is contained in:
parent
094e687e42
commit
d55729987f
@ -1815,12 +1815,7 @@ fn rewrite_unary_op(
|
|||||||
shape: Shape,
|
shape: Shape,
|
||||||
) -> Option<String> {
|
) -> Option<String> {
|
||||||
// For some reason, an UnOp is not spanned like BinOp!
|
// For some reason, an UnOp is not spanned like BinOp!
|
||||||
let operator_str = match op {
|
rewrite_unary_prefix(context, ast::UnOp::to_string(op), expr, shape)
|
||||||
ast::UnOp::Deref => "*",
|
|
||||||
ast::UnOp::Not => "!",
|
|
||||||
ast::UnOp::Neg => "-",
|
|
||||||
};
|
|
||||||
rewrite_unary_prefix(context, operator_str, expr, shape)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rewrite_assignment(
|
fn rewrite_assignment(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user