1
Fork 0

Format source codes and update tests

This commit is contained in:
Seiichi Uchida 2017-08-07 15:17:57 +09:00 committed by topecongiro
parent 04a6d16c7b
commit f9239dd630
7 changed files with 62 additions and 80 deletions

View file

@ -553,10 +553,7 @@ impl Rewrite for ast::TyParamBound {
let budget = try_opt!(shape.width.checked_sub(1));
Some(format!(
"?{}",
try_opt!(tref.rewrite(
context,
Shape::legacy(budget, shape.indent + 1),
))
try_opt!(tref.rewrite(context, Shape::legacy(budget, shape.indent + 1)))
))
}
ast::TyParamBound::RegionTyParamBound(ref l) => l.rewrite(context, shape),
@ -609,10 +606,8 @@ impl Rewrite for ast::TyParam {
};
result.push_str(eq_str);
let budget = try_opt!(shape.width.checked_sub(result.len()));
let rewrite = try_opt!(def.rewrite(
context,
Shape::legacy(budget, shape.indent + result.len()),
));
let rewrite =
try_opt!(def.rewrite(context, Shape::legacy(budget, shape.indent + result.len())));
result.push_str(&rewrite);
}