fix: record format when module select
- instead of checking the container we need to check the FieldAccess label. closes #601
This commit is contained in:
@@ -34,6 +34,23 @@ fn comment_at_end_of_file() {
|
||||
assert_fmt(input, output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn module_select_record() {
|
||||
let input = indoc! { r#"
|
||||
fn smth() {
|
||||
let a = foo.Foo { bar: 1 }
|
||||
}
|
||||
"#};
|
||||
|
||||
let output = indoc! { r#"
|
||||
fn smth() {
|
||||
let a = foo.Foo { bar: 1 }
|
||||
}
|
||||
"#};
|
||||
|
||||
assert_fmt(input, output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_format_if() {
|
||||
let src = indoc! {r#"
|
||||
|
||||
Reference in New Issue
Block a user