1
Fork 0

Merge pull request #2042 from topecongiro/refactoring

Refactorings
This commit is contained in:
Nick Cameron 2017-10-13 22:00:10 +08:00 committed by GitHub
commit fc15e9f838
5 changed files with 107 additions and 139 deletions

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))
}
}
@ -660,7 +660,7 @@ impl Rewrite for ast::Ty {
mut_str,
mt.ty.rewrite(
context,
Shape::legacy(budget, shape.indent + 1 + mut_len),
Shape::legacy(budget, shape.indent + 1 + mut_len)
)?
)
}