Format source codes and update tests
This commit is contained in:
parent
04a6d16c7b
commit
f9239dd630
7 changed files with 62 additions and 80 deletions
11
src/types.rs
11
src/types.rs
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue