diff --git a/src/expr.rs b/src/expr.rs index f41feb52631e..dbaf1cceefc6 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -718,9 +718,7 @@ fn rewrite_closure_block( if block_str.matches('\n').count() <= block_threshold as usize && !need_block_indent(&block_str, shape) { - if let Some(block_str) = block_str.rewrite(context, shape) { - return Some(format!("{} {}", prefix, block_str)); - } + return Some(format!("{} {}", prefix, block_str)); } } } diff --git a/src/types.rs b/src/types.rs index c17112c94047..1b70b5448d9f 100644 --- a/src/types.rs +++ b/src/types.rs @@ -550,7 +550,7 @@ impl Rewrite for ast::TyParamBounds { let strs = self.iter() .map(|b| b.rewrite(context, shape)) .collect::>>()?; - join_bounds(context, shape, &strs).rewrite(context, shape) + Some(join_bounds(context, shape, &strs)) } }