mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Fix clippy in otel log helper
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user