Fix clippy in otel log helper

This commit is contained in:
charley-openai
2026-05-07 23:23:39 -07:00
parent b156621ba6
commit 7993b1ad72
+5 -1
View File
@@ -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),