mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 04:46:58 +00:00
Merge pull request #1326 from durka/assoc-type-density
honor type_punctuation_density for assoc. types
This commit is contained in:
commit
a84f42d13c
@ -160,7 +160,10 @@ impl<'a> Rewrite for SegmentParam<'a> {
|
|||||||
SegmentParam::LifeTime(lt) => lt.rewrite(context, shape),
|
SegmentParam::LifeTime(lt) => lt.rewrite(context, shape),
|
||||||
SegmentParam::Type(ty) => ty.rewrite(context, shape),
|
SegmentParam::Type(ty) => ty.rewrite(context, shape),
|
||||||
SegmentParam::Binding(binding) => {
|
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 budget = try_opt!(shape.width.checked_sub(result.len()));
|
||||||
let rewrite =
|
let rewrite =
|
||||||
try_opt!(binding.ty
|
try_opt!(binding.ty
|
||||||
|
Loading…
Reference in New Issue
Block a user