diff options
Diffstat (limited to 'src/expr.rs')
| -rw-r--r-- | src/expr.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/expr.rs b/src/expr.rs index e6161c0c42b..fdea683df0a 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -317,22 +317,17 @@ pub fn format_expr( // We do not format these expressions yet, but they should still // satisfy our width restrictions. ast::ExprKind::InlineAsm(..) => Some(context.snippet(expr.span).to_owned()), - ast::ExprKind::Catch(ref block) => { - if let rw @ Some(_) = rewrite_single_line_block( - context, - "do catch ", - block, - Some(&expr.attrs), - None, - shape, - ) { + ast::ExprKind::TryBlock(ref block) => { + if let rw @ Some(_) = + rewrite_single_line_block(context, "try ", block, Some(&expr.attrs), None, shape) + { rw } else { - // 9 = `do catch ` + // 9 = `try ` let budget = shape.width.saturating_sub(9); Some(format!( "{}{}", - "do catch ", + "try ", rewrite_block( block, Some(&expr.attrs), |
