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:
@@ -26,10 +26,7 @@ fn form_c_text_pk_correct_values_parses() {
|
||||
// Items(Code:text, Title:text) — Form C expects two text
|
||||
// values (no auto-gen columns to skip).
|
||||
let schema = schema_text_pk();
|
||||
let a = assess_at_end(
|
||||
"insert into Items ('SKU-1', 'Widget')",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("insert into Items ('SKU-1', 'Widget')", &schema);
|
||||
assert!(matches!(a.state, InputState::Valid));
|
||||
assert_eq!(a.parse_result.as_deref(), Ok("Insert"));
|
||||
crate::snap!("form_c_text_pk_valid", a);
|
||||
@@ -40,10 +37,7 @@ fn form_c_serial_pk_correct_values_parses() {
|
||||
// Customers(id:serial, Name:text, Email:text) — Form C
|
||||
// skips the serial `id`, expects two text values.
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"insert into Customers ('Alice', 'a@b.c')",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("insert into Customers ('Alice', 'a@b.c')", &schema);
|
||||
assert!(matches!(a.state, InputState::Valid));
|
||||
assert_eq!(a.parse_result.as_deref(), Ok("Insert"));
|
||||
crate::snap!("form_c_serial_pk_valid", a);
|
||||
@@ -53,10 +47,7 @@ fn form_c_serial_pk_correct_values_parses() {
|
||||
fn form_c_with_null_value_parses() {
|
||||
// null is type-compatible with any slot.
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"insert into Customers (null, 'a@b.c')",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("insert into Customers (null, 'a@b.c')", &schema);
|
||||
assert!(matches!(a.state, InputState::Valid));
|
||||
crate::snap!("form_c_null_value", a);
|
||||
}
|
||||
@@ -71,10 +62,7 @@ fn form_c_rejects_number_for_text_column() {
|
||||
// rejects it at parse time. Before Form-C type-awareness
|
||||
// this parsed Valid and only failed at bind time.
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"insert into Customers (3.14, 'a@b.c')",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("insert into Customers (3.14, 'a@b.c')", &schema);
|
||||
assert!(
|
||||
!matches!(a.state, InputState::Valid),
|
||||
"Form C should now type-check `3.14` against Name(text), got {:?}",
|
||||
@@ -114,13 +102,9 @@ fn form_c_second_slot_shows_typed_prose_for_column() {
|
||||
// First token `'Alice'` is a string literal → Form C. At
|
||||
// the second slot the hint names the Email column.
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"insert into Customers ('Alice', ",
|
||||
&schema,
|
||||
);
|
||||
let prose = hint_prose(&a).unwrap_or_else(|| {
|
||||
panic!("expected Prose at Form C second slot, got {:?}", a.hint)
|
||||
});
|
||||
let a = assess_at_end("insert into Customers ('Alice', ", &schema);
|
||||
let prose = hint_prose(&a)
|
||||
.unwrap_or_else(|| panic!("expected Prose at Form C second slot, got {:?}", a.hint));
|
||||
assert!(
|
||||
prose.contains("Email"),
|
||||
"Form C second slot should name `Email`, got prose: {prose:?}",
|
||||
@@ -143,10 +127,7 @@ fn form_c_in_progress_after_comma_is_incomplete() {
|
||||
#[test]
|
||||
fn form_c_in_progress_without_close_paren_is_incomplete() {
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"insert into Customers ('Alice', 'a@b.c'",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("insert into Customers ('Alice', 'a@b.c'", &schema);
|
||||
assert!(matches!(a.state, InputState::IncompleteAtEof));
|
||||
crate::snap!("form_c_in_progress_no_close", a);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user