Format
This commit is contained in:
parent
979d131c5d
commit
5280583369
1 changed files with 5 additions and 11 deletions
16
src/expr.rs
16
src/expr.rs
|
@ -180,17 +180,11 @@ pub fn format_expr(
|
|||
)
|
||||
}
|
||||
}
|
||||
ast::ExprKind::Yield(ref opt_expr) => {
|
||||
if let Some(ref expr) = *opt_expr {
|
||||
rewrite_unary_prefix(context, "yield ", &**expr, shape)
|
||||
} else {
|
||||
wrap_str(
|
||||
"yield".to_string(),
|
||||
context.config.max_width(),
|
||||
shape,
|
||||
)
|
||||
}
|
||||
}
|
||||
ast::ExprKind::Yield(ref opt_expr) => if let Some(ref expr) = *opt_expr {
|
||||
rewrite_unary_prefix(context, "yield ", &**expr, shape)
|
||||
} else {
|
||||
wrap_str("yield".to_string(), context.config.max_width(), shape)
|
||||
},
|
||||
ast::ExprKind::Closure(capture, ref fn_decl, ref body, _) => {
|
||||
rewrite_closure(capture, fn_decl, body, expr.span, context, shape)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue