From 7993b1ad7243f97321f123068e00bc7d8a0498dc Mon Sep 17 00:00:00 2001 From: charley-openai Date: Thu, 7 May 2026 23:23:39 -0700 Subject: [PATCH] Fix clippy in otel log helper --- codex-rs/core/tests/suite/otel.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/tests/suite/otel.rs b/codex-rs/core/tests/suite/otel.rs index 7e7cca992d..8ef22196c8 100644 --- a/codex-rs/core/tests/suite/otel.rs +++ b/codex-rs/core/tests/suite/otel.rs @@ -88,7 +88,11 @@ async fn assert_log_line_eventually( ) { let start = Instant::now(); loop { - let logs = String::from_utf8(buffer.lock().unwrap().clone()).unwrap(); + let bytes = match buffer.lock() { + Ok(guard) => guard.clone(), + Err(poisoned) => poisoned.into_inner().clone(), + }; + let logs = String::from_utf8_lossy(&bytes); if logs.lines().any(&matches) || start.elapsed() > Duration::from_secs(5) { assert!( logs.lines().any(&matches),