codex: fix CI failure on PR #31891

This commit is contained in:
Owen Lin
2026-07-09 20:53:56 -07:00
parent f5c26ecd8d
commit 239e27c004
2 changed files with 6 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ const READ_CHUNK_SIZE: usize = 8 * 1024;
#[derive(Debug)]
pub(crate) enum ScanOutcome<T> {
Parsed(T),
#[allow(dead_code)]
Rejected(serde_json::Error),
}

View File

@@ -245,13 +245,11 @@ where
{
let mut scanner = ReverseJsonlScanner::new(File::open(path)?)?;
while let Some(outcome) = scanner.scan_next::<SessionIndexEntry>()? {
match outcome {
ScanOutcome::Parsed(entry) => {
if let Some(entry) = visit_entry(&entry)? {
return Ok(Some(entry));
}
}
ScanOutcome::Rejected(_) => continue,
let ScanOutcome::Parsed(entry) = outcome else {
continue;
};
if let Some(entry) = visit_entry(&entry)? {
return Ok(Some(entry));
}
}
Ok(None)