From fab9c62dfb52a53dc9a588a205755b37f36ec700 Mon Sep 17 00:00:00 2001 From: Amber Brault Date: Wed, 2 Oct 2024 01:20:09 -0400 Subject: [PATCH] Bump cwextab (#113) * Bump cwextab * Updated cwextab to not error on null actions --- Cargo.lock | 4 ++-- objdiff-core/Cargo.toml | 2 +- objdiff-gui/Cargo.toml | 2 +- objdiff-gui/src/views/extab_diff.rs | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3144b7..8d91351 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -906,9 +906,9 @@ checksum = "c2e06f9bce634a3c898eb1e5cb949ff63133cbb218af93cc9b38b31d6f3ea285" [[package]] name = "cwextab" -version = "0.3.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f1036150ed9aa3265b83b9755a14db1600231e0478e678241e4f4d7c30bcf6" +checksum = "9a116d883de4f49be4db14f737ec573433798fcea9841594a530f8018d48f303" dependencies = [ "thiserror", ] diff --git a/objdiff-core/Cargo.toml b/objdiff-core/Cargo.toml index 951a5ff..49dd4e0 100644 --- a/objdiff-core/Cargo.toml +++ b/objdiff-core/Cargo.toml @@ -60,7 +60,7 @@ gimli = { version = "0.31", default-features = false, features = ["read-all"], o # ppc cwdemangle = { version = "1.0", optional = true } -cwextab = { version = "0.3", optional = true } +cwextab = { version = "1.0.1", optional = true } ppc750cl = { version = "0.3", optional = true } # mips diff --git a/objdiff-gui/Cargo.toml b/objdiff-gui/Cargo.toml index 9f1e073..b22ce06 100644 --- a/objdiff-gui/Cargo.toml +++ b/objdiff-gui/Cargo.toml @@ -29,7 +29,7 @@ bytes = "1.7" cfg-if = "1.0" const_format = "0.2" cwdemangle = "1.0" -cwextab = "0.3.1" +cwextab = "1.0.1" dirs = "5.0" egui = "0.29" egui_extras = "0.29" diff --git a/objdiff-gui/src/views/extab_diff.rs b/objdiff-gui/src/views/extab_diff.rs index a84a3a5..299f5a4 100644 --- a/objdiff-gui/src/views/extab_diff.rs +++ b/objdiff-gui/src/views/extab_diff.rs @@ -26,17 +26,17 @@ fn find_symbol(obj: &ObjInfo, selected_symbol: &SymbolRefByName) -> Option String { let mut text = String::from(""); - let mut dtor_names: Vec<&str> = vec![]; + let mut dtor_names: Vec = vec![]; for dtor in &extab.dtors { //For each function name, use the demangled name by default, //and if not available fallback to the original name - let name = match &dtor.demangled_name { - Some(demangled_name) => demangled_name, - None => &dtor.name, + let name: String = match &dtor.demangled_name { + Some(demangled_name) => demangled_name.to_string(), + None => dtor.name.clone(), }; - dtor_names.push(name.as_str()); + dtor_names.push(name); } - if let Some(decoded) = extab.data.to_string(&dtor_names) { + if let Some(decoded) = extab.data.to_string(dtor_names) { text += decoded.as_str(); }