This commit is contained in:
jif-oai
2025-11-12 14:09:20 +00:00
parent c3480d94a1
commit 34b57eff3f
3 changed files with 11 additions and 13 deletions

View File

@@ -109,9 +109,7 @@ pub async fn process_sse_wire<S, D>(
fn next_frame(buffer: &mut String) -> Option<String> {
loop {
let Some(idx) = buffer.find("\n\n") else {
return None;
};
let idx = buffer.find("\n\n")?;
let frame = buffer[..idx].to_string();
buffer.drain(..idx + 2);