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:
rvcas
2023-06-13 00:18:32 -04:00
parent a5245fdc6b
commit aeaec6bcd8
2 changed files with 18 additions and 3 deletions

View File

@@ -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#"