style: format the whole tree with cargo fmt (stock defaults, #35)

One-time, mechanical reformat — no functional changes. The tree was not
rustfmt-clean (~1800 hunks across ~100 files); this brings it to stock
`cargo fmt` defaults so a `cargo fmt --check` CI gate can follow.
Behaviour-preserving: 2509 pass / 0 fail / 1 ignored (unchanged baseline),
clippy clean. A .git-blame-ignore-revs entry follows so `git blame`
skips this commit.
This commit is contained in:
claude@clouddev1
2026-06-17 21:39:19 +00:00
parent e9606b5f6d
commit 41b7e9a049
102 changed files with 8017 additions and 4975 deletions
+23 -53
View File
@@ -38,7 +38,10 @@ fn form_b_first_value_skips_serial_column() {
let schema = schema_serial_pk();
let a = assess_at_end("insert into Customers values (", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose at first Form B value slot, got {:?}", a.hint)
panic!(
"expected Prose at first Form B value slot, got {:?}",
a.hint
)
});
// The value slot itself must be keyed on `Name` — the first
// non-auto column — not on the skipped `id`.
@@ -60,9 +63,7 @@ fn form_b_first_value_skips_serial_column() {
fn form_b_first_value_text_pk_names_first_column() {
let schema = schema_text_pk();
let a = assess_at_end("insert into Items values (", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose, got {:?}", a.hint)
});
let prose = hint_prose(&a).unwrap_or_else(|| panic!("expected Prose, got {:?}", a.hint));
assert!(
prose.contains("Code"),
"Form B should name the PK column `Code`, got prose: {prose:?}",
@@ -76,9 +77,7 @@ fn form_b_first_value_every_type_first_column_is_int() {
// must say `integer` and name `k`.
let schema = schema_every_type();
let a = assess_at_end("insert into Things values (", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose, got {:?}", a.hint)
});
let prose = hint_prose(&a).unwrap_or_else(|| panic!("expected Prose, got {:?}", a.hint));
assert!(
prose.contains("k"),
"should name column `k`, got prose: {prose:?}",
@@ -98,13 +97,9 @@ fn form_b_first_value_every_type_first_column_is_int() {
#[test]
fn form_b_after_first_value_advances_to_next_column() {
let schema = schema_serial_pk();
let a = assess_at_end(
"insert into Customers values ('Alice', ",
&schema,
);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose at second slot, got {:?}", a.hint)
});
let a = assess_at_end("insert into Customers values ('Alice', ", &schema);
let prose =
hint_prose(&a).unwrap_or_else(|| panic!("expected Prose at second slot, got {:?}", a.hint));
assert!(
prose.contains("Email"),
"second slot should name `Email`, got prose: {prose:?}",
@@ -121,10 +116,7 @@ fn form_b_after_first_value_advances_to_next_column() {
#[test]
fn form_b_in_progress_after_comma_is_incomplete() {
let schema = schema_serial_pk();
let a = assess_at_end(
"insert into Customers values ('Alice', ",
&schema,
);
let a = assess_at_end("insert into Customers values ('Alice', ", &schema);
assert!(
matches!(a.state, InputState::IncompleteAtEof),
"in-progress Form B should be Incomplete, got {:?}",
@@ -136,10 +128,7 @@ fn form_b_in_progress_after_comma_is_incomplete() {
#[test]
fn form_b_in_progress_without_closing_paren_is_incomplete() {
let schema = schema_serial_pk();
let a = assess_at_end(
"insert into Customers values ('Alice', 'a@b.c'",
&schema,
);
let a = assess_at_end("insert into Customers values ('Alice', 'a@b.c'", &schema);
assert!(matches!(a.state, InputState::IncompleteAtEof));
crate::snap!("form_b_in_progress_no_close_paren", a);
}
@@ -201,10 +190,7 @@ fn form_b_with_extra_value_for_serial_column_is_invalid() {
#[test]
fn form_b_with_correct_values_parses() {
let schema = schema_serial_pk();
let a = assess_at_end(
"insert into Customers values ('Alice', 'a@b.c')",
&schema,
);
let a = assess_at_end("insert into Customers values ('Alice', 'a@b.c')", &schema);
assert!(matches!(a.state, InputState::Valid));
assert_eq!(a.parse_result.as_deref(), Ok("Insert"));
crate::snap!("form_b_valid", a);
@@ -213,10 +199,7 @@ fn form_b_with_correct_values_parses() {
#[test]
fn form_b_text_pk_with_correct_values_parses() {
let schema = schema_text_pk();
let a = assess_at_end(
"insert into Items values ('SKU-1', 'Widget')",
&schema,
);
let a = assess_at_end("insert into Items values ('SKU-1', 'Widget')", &schema);
assert!(matches!(a.state, InputState::Valid));
assert_eq!(a.parse_result.as_deref(), Ok("Insert"));
crate::snap!("form_b_text_pk_valid", a);
@@ -240,9 +223,8 @@ fn form_b_text_pk_with_correct_values_parses() {
fn form_b_first_slot_mentions_skipped_serial_column() {
let schema = schema_serial_pk();
let a = assess_at_end("insert into Customers values (", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose at first Form B slot, got {:?}", a.hint)
});
let prose = hint_prose(&a)
.unwrap_or_else(|| panic!("expected Prose at first Form B slot, got {:?}", a.hint));
// Names the skipped auto-gen column.
assert!(
prose.contains("`id`"),
@@ -261,13 +243,9 @@ fn form_b_second_slot_omits_skip_note() {
// The note fires once, at the first slot only — not at
// every comma.
let schema = schema_serial_pk();
let a = assess_at_end(
"insert into Customers values ('Alice', ",
&schema,
);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose at second slot, got {:?}", a.hint)
});
let a = assess_at_end("insert into Customers values ('Alice', ", &schema);
let prose =
hint_prose(&a).unwrap_or_else(|| panic!("expected Prose at second slot, got {:?}", a.hint));
assert!(
!prose.contains("auto-generated"),
"second-slot hint must NOT repeat the skip note, got: {prose:?}",
@@ -280,9 +258,7 @@ fn form_b_text_pk_has_no_skip_note() {
// No auto-gen columns → no skip note.
let schema = schema_text_pk();
let a = assess_at_end("insert into Items values (", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose, got {:?}", a.hint)
});
let prose = hint_prose(&a).unwrap_or_else(|| panic!("expected Prose, got {:?}", a.hint));
assert!(
!prose.contains("auto-generated"),
"text-PK table has no auto-gen column — no skip note expected, got: {prose:?}",
@@ -295,13 +271,8 @@ fn form_a_first_slot_has_no_skip_note() {
// Form A lists columns explicitly — the user is in control,
// no pedagogical pointer needed.
let schema = schema_serial_pk();
let a = assess_at_end(
"insert into Customers (Name) values (",
&schema,
);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose, got {:?}", a.hint)
});
let a = assess_at_end("insert into Customers (Name) values (", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| panic!("expected Prose, got {:?}", a.hint));
assert!(
!prose.contains("auto-generated"),
"Form A must not show the Form-B skip note, got: {prose:?}",
@@ -315,9 +286,8 @@ fn form_b_advances_through_every_type_first_to_real() {
// first value, prose must name `r` and say `number`.
let schema = schema_every_type();
let a = assess_at_end("insert into Things values (1, ", &schema);
let prose = hint_prose(&a).unwrap_or_else(|| {
panic!("expected Prose at 2nd slot, got {:?}", a.hint)
});
let prose =
hint_prose(&a).unwrap_or_else(|| panic!("expected Prose at 2nd slot, got {:?}", a.hint));
assert!(prose.contains("r"), "should name `r`, got prose: {prose:?}");
assert!(
prose.contains("number"),