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:
@@ -64,9 +64,7 @@ fn after_set_column_expects_equals() {
|
||||
fn after_equals_offers_typed_slot_prose_for_column() {
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end("update Customers set Email=", &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("Email"),
|
||||
"should name `Email`, got prose: {prose:?}",
|
||||
@@ -82,9 +80,7 @@ fn after_equals_offers_typed_slot_prose_for_column() {
|
||||
fn after_equals_for_date_column_says_yyyy_mm_dd() {
|
||||
let schema = schema_every_type();
|
||||
let a = assess_at_end("update Things set dt=", &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("YYYY-MM-DD"),
|
||||
"date-slot prose should reference YYYY-MM-DD, got {prose:?}",
|
||||
@@ -95,10 +91,7 @@ fn after_equals_for_date_column_says_yyyy_mm_dd() {
|
||||
#[test]
|
||||
fn mid_assignment_list_after_comma_offers_remaining_columns() {
|
||||
let schema = schema_multi_table();
|
||||
let a = assess_at_end(
|
||||
"update Customers set Name='x', ",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("update Customers set Name='x', ", &schema);
|
||||
assert!(matches!(a.state, InputState::IncompleteAtEof));
|
||||
// Customers columns offered, no leakage.
|
||||
assert_candidate_present(&a, &["id"]);
|
||||
@@ -109,10 +102,7 @@ fn mid_assignment_list_after_comma_offers_remaining_columns() {
|
||||
#[test]
|
||||
fn after_assignments_expects_where_or_all_rows() {
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"update Customers set Email='new@b.c' ",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("update Customers set Email='new@b.c' ", &schema);
|
||||
assert!(matches!(a.state, InputState::IncompleteAtEof));
|
||||
assert_candidate_present(&a, &["where", "--all-rows"]);
|
||||
crate::snap!("after_assignments", a);
|
||||
@@ -125,10 +115,7 @@ fn after_assignments_expects_where_or_all_rows() {
|
||||
#[test]
|
||||
fn after_where_keyword_offers_active_table_columns() {
|
||||
let schema = schema_multi_table();
|
||||
let a = assess_at_end(
|
||||
"update Customers set Name='x' where ",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("update Customers set Name='x' where ", &schema);
|
||||
assert!(matches!(a.state, InputState::IncompleteAtEof));
|
||||
assert_candidate_present(&a, &["id", "Name"]);
|
||||
assert_no_candidate_named(&a, &["OrderId", "CustId", "Total"]);
|
||||
@@ -138,13 +125,8 @@ fn after_where_keyword_offers_active_table_columns() {
|
||||
#[test]
|
||||
fn after_where_column_equals_offers_typed_prose() {
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"update Customers set Email='x' where id=",
|
||||
&schema,
|
||||
);
|
||||
let prose = hint_prose(&a).unwrap_or_else(|| {
|
||||
panic!("expected Prose, got {:?}", a.hint)
|
||||
});
|
||||
let a = assess_at_end("update Customers set Email='x' where id=", &schema);
|
||||
let prose = hint_prose(&a).unwrap_or_else(|| panic!("expected Prose, got {:?}", a.hint));
|
||||
assert!(
|
||||
prose.contains("id"),
|
||||
"should name where column `id`, got prose: {prose:?}",
|
||||
@@ -159,10 +141,7 @@ fn after_where_column_equals_offers_typed_prose() {
|
||||
#[test]
|
||||
fn complete_update_with_where_parses() {
|
||||
let schema = schema_serial_pk();
|
||||
let a = assess_at_end(
|
||||
"update Customers set Email='new@b.c' where id=1",
|
||||
&schema,
|
||||
);
|
||||
let a = assess_at_end("update Customers set Email='new@b.c' where id=1", &schema);
|
||||
assert!(matches!(a.state, InputState::Valid));
|
||||
assert_eq!(a.parse_result.as_deref(), Ok("Update"));
|
||||
crate::snap!("complete_update", a);
|
||||
|
||||
Reference in New Issue
Block a user