Skip to content

Commit 277ed28

Browse files
delexwclaude
andauthored
fix(parser): add explicit lifetime to Cow return type (fixes clippy lint)
Fixes `mismatched_lifetime_syntaxes` lint: `Cow<str>` → `Cow<'_, str>` makes the elided lifetime on the `&str` input and the lifetime in the return type consistent, silencing `-D warnings` under `cargo clippy`. https://claude.ai/code/session_01Fmh1aPCyB1xMDwNQbk56in Co-authored-by: Claude <noreply@anthropic.com>
1 parent 833e266 commit 277ed28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src-tauri/src/parser/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn hex4_to_u16(bytes: &[u8]) -> Option<u16> {
172172
/// the tool-error truncation logic split a multi-byte emoji at an offset
173173
/// boundary. serde_json rejects lone surrogates per RFC 8259; this pass makes
174174
/// such lines parseable before they reach the deserializer.
175-
fn sanitize_lone_surrogates(s: &str) -> Cow<str> {
175+
fn sanitize_lone_surrogates(s: &str) -> Cow<'_, str> {
176176
let bytes = s.as_bytes();
177177
let len = bytes.len();
178178
let mut i = 0;

0 commit comments

Comments
 (0)