Open
Description
I have been using the struct_field_align_threshold
option to align struct fields and it is great, however one issue I have noticed whilst using it is that the formatting isn't applied when using ..Default::default()
. For example, formatting the follow struct has no impact:
StandardMaterial {
base_color_texture: Some(asset_server.load("textures/card_back.png")),
cull_mode: Some(Face::Front),
fog_enabled: false,
unlit: true,
alpha_mode: AlphaMode::Blend,
..Default::default()
}
I would expect:
StandardMaterial {
base_color_texture: Some(asset_server.load("textures/card_back.png")),
cull_mode: Some(Face::Front),
fog_enabled: false,
unlit: true,
alpha_mode: AlphaMode::Blend,
..Default::default()
}
If I remove the ..Default::default()
line, rustfmt
will align the fields as expected:
StandardMaterial {
base_color_texture: Some(asset_server.load("textures/card_back.png")),
cull_mode: Some(Face::Front),
fog_enabled: false,
unlit: true,
alpha_mode: AlphaMode::Blend,
}
Metadata
Metadata
Assignees
Labels
No labels