diff --git a/crates/aptos-system-utils/src/thread_dump.rs b/crates/aptos-system-utils/src/thread_dump.rs index 368d2ded380d84..65bb1576875027 100644 --- a/crates/aptos-system-utils/src/thread_dump.rs +++ b/crates/aptos-system-utils/src/thread_dump.rs @@ -135,11 +135,7 @@ async fn do_thread_dump( body.push_str(&format!("Frame ip: {}\n", frame.ip())); } for symbol in frame.symbols() { - let name = if let Some(name) = symbol.name() { - name - } else { - "(unknown)" - }; + let name = symbol.name().unwrap_or("(unknown)"); if location { let location = if let Some(file) = symbol.file() { if let Some(line) = symbol.line() {