Remove calling rewrite() against String

This commit is contained in:
Seiichi Uchida 2017-10-07 22:01:44 +09:00
parent dde0cdabe0
commit dd5ed53930
2 changed files with 2 additions and 4 deletions

View file

@ -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));
}
}
}

View file

@ -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))
}
}