Merge pull request #1326 from durka/assoc-type-density
honor type_punctuation_density for assoc. types
This commit is contained in:
commit
a84f42d13c
1 changed files with 4 additions and 1 deletions
|
|
@ -160,7 +160,10 @@ impl<'a> Rewrite for SegmentParam<'a> {
|
|||
SegmentParam::LifeTime(lt) => lt.rewrite(context, shape),
|
||||
SegmentParam::Type(ty) => ty.rewrite(context, shape),
|
||||
SegmentParam::Binding(binding) => {
|
||||
let mut result = format!("{} = ", binding.ident);
|
||||
let mut result = match context.config.type_punctuation_density {
|
||||
TypeDensity::Wide => format!("{} = ", binding.ident),
|
||||
TypeDensity::Compressed => format!("{}=", binding.ident),
|
||||
};
|
||||
let budget = try_opt!(shape.width.checked_sub(result.len()));
|
||||
let rewrite =
|
||||
try_opt!(binding.ty
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue