style(lists): apply rustfmt to checkbox propagation
CI's cargo fmt --check flagged a few lines from the propagation patch that exceeded the wrapping threshold. No behavioural change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1515,7 +1515,10 @@ pub mod ops {
|
||||
}
|
||||
let segment = &text[start..end];
|
||||
let bytes = segment.as_bytes();
|
||||
let line_end = bytes.iter().position(|&b| b == b'\n').unwrap_or(bytes.len());
|
||||
let line_end = bytes
|
||||
.iter()
|
||||
.position(|&b| b == b'\n')
|
||||
.unwrap_or(bytes.len());
|
||||
let bytes = &bytes[..line_end];
|
||||
let mut i = 0;
|
||||
while i + 2 < bytes.len() {
|
||||
|
||||
@@ -123,7 +123,8 @@ fn checkbox_edit_finds_item_in_sublist() {
|
||||
fn checkbox_edit_uses_changes_map_not_document_changes() {
|
||||
let src = "- [ ] task\n";
|
||||
let doc = parse(src);
|
||||
let edit = ops::checkbox_edit(src, &doc, &dummy_uri(), 0, 4, true, ops::toggle_state, true).unwrap();
|
||||
let edit =
|
||||
ops::checkbox_edit(src, &doc, &dummy_uri(), 0, 4, true, ops::toggle_state, true).unwrap();
|
||||
assert!(doc_changes_for(edit.clone()).is_none());
|
||||
assert!(edit.changes.is_some());
|
||||
}
|
||||
@@ -238,7 +239,16 @@ fn propagate_disabled_only_emits_leaf_edit() {
|
||||
- [ ] sub4
|
||||
";
|
||||
let doc = parse(src);
|
||||
let edit = ops::checkbox_edit(src, &doc, &dummy_uri(), 1, 6, true, ops::toggle_state, false)
|
||||
let edit = ops::checkbox_edit(
|
||||
src,
|
||||
&doc,
|
||||
&dummy_uri(),
|
||||
1,
|
||||
6,
|
||||
true,
|
||||
ops::toggle_state,
|
||||
false,
|
||||
)
|
||||
.expect("toggle edit");
|
||||
let pairs = edits_by_line(edit);
|
||||
assert_eq!(pairs, vec![(1, "[X]".into())]);
|
||||
|
||||
Reference in New Issue
Block a user