fix(tui): use strip_prefix for the diff context marker (clippy manual_strip)

afe5f9b30f replaced trim_start_matches(' ') with &raw[1..] inside an
`if raw.starts_with(' ')` block, which clippy's manual_strip rejects
under CI's -D warnings. Same behaviour: exactly one leading space is
dropped from a context row.

Found by running cargo clippy -p codewhale-tui --all-targets
--all-features --locked with CI's flags after the push; the earlier
clippy run predated the &raw[1..] change, as afe5f9b30f's message says.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NBKbhx19BRbZtvWK8rVKjz
This commit is contained in:
CodeWhale BotandClaude Opus 5.5 committed 2026-10-18 11:20:37 -07:00
1 parent afe5f9b30f
commit 37a596b596
1 file changed
+1 -2
+1 -2
View File
@@ -251,8 +251,7 @@ pub fn render_diff_body_bounded(diff: &str, width: u16, max_rows: usize) -> Boun
continue;
}
if raw.starts_with(' ') {
let content = &raw[1..];
if let Some(content) = raw.strip_prefix(' ') {
collector.extend(render_diff_line(
content,
width,