fix(editor): clippy needless_range_loop in ai_chat_transcript

Use `messages.iter().enumerate().skip(start)` instead of the
explicit index loop `for i in start..messages.len()`; clippy's
`-D warnings` gate on Rust 1.94 trips on the former. Also bump
the casement submodule to da0bf09 so its .gitattributes forces
LF for source files (fixes Windows CI `cargo fmt --check` on
the vendored fork).
This commit is contained in:
Kayshen-X 2026-05-21 22:33:10 +08:00
parent 25e644dbc7
commit 90fad0e17d
2 changed files with 3 additions and 3 deletions

View file

@ -272,8 +272,8 @@ pub(crate) fn build_transcript(
// Pass 2 — place the visible tail from the body top.
let mut items = Vec::new();
let mut top = body_rect.origin.y;
for i in start..messages.len() {
let (item, bottom) = build_item(&messages[i], i, top, body_rect, locale);
for (i, msg) in messages.iter().enumerate().skip(start) {
let (item, bottom) = build_item(msg, i, top, body_rect, locale);
items.push(item);
top = bottom + MSG_GAP;
}

2
vendor/casement vendored

@ -1 +1 @@
Subproject commit 5877fa83e8f7c5ce81afec234c1cd5146262a92e
Subproject commit da0bf09e2fa5412f8ddf0cbc115355116b59ce0a