cargo fmt

This commit is contained in:
Aidan 2024-07-27 17:37:28 -04:00
parent 62dbe9fb53
commit 2738cd717d

View file

@ -6232,50 +6232,43 @@ mod test_fmt {
#[test] #[test]
fn preserve_annotated_body() { fn preserve_annotated_body() {
expr_formats_same( expr_formats_same(indoc!(
indoc!( r"
r"
x : i32 x : i32
x = 1 x = 1
x x
" "
) ));
);
} }
#[test] #[test]
fn preserve_annotated_body_comment() { fn preserve_annotated_body_comment() {
expr_formats_same( expr_formats_same(indoc!(
indoc!( r"
r"
x : i32 # comment x : i32 # comment
x = 1 x = 1
x x
" "
) ));
);
} }
#[test] #[test]
fn preserve_annotated_body_comments() { fn preserve_annotated_body_comments() {
expr_formats_same( expr_formats_same(indoc!(
indoc!( r"
r"
x : i32 x : i32
# comment # comment
# comment 2 # comment 2
x = 1 x = 1
x x
" "
) ));
);
} }
#[test] #[test]
fn preserve_annotated_body_comments_with_newlines() { fn preserve_annotated_body_comments_with_newlines() {
expr_formats_same( expr_formats_same(indoc!(
indoc!( r"
r"
x : i32 x : i32
# comment # comment
@ -6285,36 +6278,31 @@ mod test_fmt {
x = 1 x = 1
x x
" "
) ));
);
} }
#[test] #[test]
fn preserve_annotated_body_blank_comment() { fn preserve_annotated_body_blank_comment() {
expr_formats_same( expr_formats_same(indoc!(
indoc!( r"
r"
x : i32 x : i32
# #
x = 1 x = 1
x x
" "
) ));
);
} }
#[test] #[test]
fn preserve_annotated_body_with_newlines() { fn preserve_annotated_body_with_newlines() {
expr_formats_same( expr_formats_same(indoc!(
indoc!( r"
r"
x : i32 x : i32
x = 1 x = 1
x x
" "
) ));
);
} }
// this is a parse error atm // this is a parse error atm