Remove calling rewrite() against String
This commit is contained in:
parent
dde0cdabe0
commit
dd5ed53930
2 changed files with 2 additions and 4 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ impl Rewrite for ast::TyParamBounds {
|
|||
let strs = self.iter()
|
||||
.map(|b| b.rewrite(context, shape))
|
||||
.collect::<Option<Vec<_>>>()?;
|
||||
join_bounds(context, shape, &strs).rewrite(context, shape)
|
||||
Some(join_bounds(context, shape, &strs))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue