core: rustfmt splits on fn_call_width, not max_width
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 2m52s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 5m14s
Desktop (Tauri) / Update manifest (push) Successful in 4s
Android / Kotlin + Rust (APK) (push) Successful in 7m19s

Three assertions I had collapsed to one line because they fit inside
max_width=100. rustfmt's fn_call_width is 60 and applies to the ARGUMENT list,
so a call can sit well under the line limit and still be split vertically.
Clippy and the tests were already green; this is the formatter only.
This commit is contained in:
2026-08-24 00:28:08 -04:00
parent 1045db318b
commit d0e3e48943
+12 -3
View File
@@ -294,7 +294,10 @@ mod tests {
#[test]
fn items_basic() {
let body = "shopping\n\n- [ ] milk\n- [x] eggs";
assert_eq!(extract_items(body), vec![item("milk", false), item("eggs", true)]);
assert_eq!(
extract_items(body),
vec![item("milk", false), item("eggs", true)]
);
}
#[test]
@@ -324,7 +327,10 @@ mod tests {
fn items_accept_star_bullets_and_indentation() {
// `*` because markdown.ts already takes it for a plain bullet.
let body = "* [ ] star\n - [x] indented";
assert_eq!(extract_items(body), vec![item("star", false), item("indented", true)]);
assert_eq!(
extract_items(body),
vec![item("star", false), item("indented", true)]
);
}
#[test]
@@ -350,7 +356,10 @@ mod tests {
#[test]
fn checking_addresses_items_not_lines() {
let body = "note\n- [ ] a\nprose\n- [ ] b";
assert_eq!(set_item_checked(body, 1, true), "note\n- [ ] a\nprose\n- [x] b");
assert_eq!(
set_item_checked(body, 1, true),
"note\n- [ ] a\nprose\n- [x] b"
);
}
#[test]