Skip to content

Commit 7aa878b

Browse files
committed
Update all dependencies & clippy fixes
1 parent a119d9a commit 7aa878b

File tree

11 files changed

+722
-432
lines changed

11 files changed

+722
-432
lines changed

Cargo.lock

Lines changed: 691 additions & 398 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deny.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ ignore = [
7373
#{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" },
7474
#"[email protected]", # you can also ignore yanked crate versions if you wish
7575
#{ crate = "[email protected]", reason = "you can specify why you are ignoring the yanked crate" },
76+
{ id = "RUSTSEC-2024-0384", reason = "Unmaintained indirect dependency" },
7677
]
7778
# If this is true, then cargo deny will use the git executable to fetch advisory database.
7879
# If this is false, then it uses a built-in git library.
@@ -97,7 +98,7 @@ allow = [
9798
"BSL-1.0",
9899
"CC0-1.0",
99100
"MPL-2.0",
100-
"Unicode-DFS-2016",
101+
"Unicode-3.0",
101102
"Zlib",
102103
"0BSD",
103104
"OFL-1.1",

objdiff-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enable-ansi-support = "0.2"
2020
memmap2 = "0.9"
2121
objdiff-core = { path = "../objdiff-core", features = ["all"] }
2222
prost = "0.13"
23-
ratatui = "0.28"
23+
ratatui = "0.29"
2424
rayon = "1.10"
2525
serde = { version = "1.0", features = ["derive"] }
2626
serde_json = "1.0"

objdiff-core/src/bindings/diff.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::needless_lifetimes)] // Generated serde code
12
use crate::{
23
diff::{
34
ObjDataDiff, ObjDataDiffKind, ObjDiff, ObjInsArgDiff, ObjInsBranchFrom, ObjInsBranchTo,

objdiff-core/src/bindings/report.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::needless_lifetimes)] // Generated serde code
12
use std::ops::AddAssign;
23

34
use anyhow::{bail, Result};
@@ -173,8 +174,7 @@ impl Report {
173174
continue;
174175
}
175176
fn is_sub_category(id: &str, parent: &str, sep: char) -> bool {
176-
id.starts_with(parent)
177-
&& id.get(parent.len()..).map_or(false, |s| s.starts_with(sep))
177+
id.starts_with(parent) && id.get(parent.len()..).is_some_and(|s| s.starts_with(sep))
178178
}
179179
let mut sub_categories = self
180180
.categories

objdiff-core/src/obj/read.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ fn to_obj_symbol(
6565
flags = ObjSymbolFlagSet(flags.0 | ObjSymbolFlags::Hidden);
6666
}
6767
#[cfg(feature = "ppc")]
68-
if arch
69-
.ppc()
70-
.and_then(|a| a.extab.as_ref())
71-
.map_or(false, |e| e.contains_key(&symbol.index().0))
68+
if arch.ppc().and_then(|a| a.extab.as_ref()).is_some_and(|e| e.contains_key(&symbol.index().0))
7269
{
7370
flags = ObjSymbolFlagSet(flags.0 | ObjSymbolFlags::HasExtra);
7471
}

objdiff-gui/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ wsl = []
2525

2626
[dependencies]
2727
anyhow = "1.0"
28-
bytes = "1.7"
28+
bytes = "1.9"
2929
cfg-if = "1.0"
3030
const_format = "0.2"
3131
cwdemangle = "1.0"
@@ -42,7 +42,7 @@ notify = { git = "https://github.com/notify-rs/notify", rev = "128bf6230c03d39db
4242
objdiff-core = { path = "../objdiff-core", features = ["all"] }
4343
open = "5.3"
4444
png = "0.17"
45-
pollster = "0.3"
45+
pollster = "0.4"
4646
regex = "1.11"
4747
rfd = { version = "0.15" } #, default-features = false, features = ['xdg-portal']
4848
rlwinmdec = "1.0"
@@ -51,7 +51,7 @@ serde = { version = "1.0", features = ["derive"] }
5151
serde_json = "1.0"
5252
shell-escape = "0.1"
5353
strum = { version = "0.26", features = ["derive"] }
54-
tempfile = "3.13"
54+
tempfile = "3.14"
5555
time = { version = "0.3", features = ["formatting", "local-offset"] }
5656

5757
# Keep version in sync with egui

objdiff-gui/src/jobs/mod.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,14 @@ fn start_job(
152152
let context = JobContext { status: status.clone(), egui: ctx.clone() };
153153
let context_inner = JobContext { status: status.clone(), egui: ctx.clone() };
154154
let (tx, rx) = std::sync::mpsc::channel();
155-
let handle = std::thread::spawn(move || {
156-
return match run(context_inner, rx) {
157-
Ok(state) => state,
158-
Err(e) => {
159-
if let Ok(mut w) = status.write() {
160-
w.error = Some(e);
161-
}
162-
JobResult::None
155+
let handle = std::thread::spawn(move || match run(context_inner, rx) {
156+
Ok(state) => state,
157+
Err(e) => {
158+
if let Ok(mut w) = status.write() {
159+
w.error = Some(e);
163160
}
164-
};
161+
JobResult::None
162+
}
165163
});
166164
let id = JOB_ID.fetch_add(1, Ordering::Relaxed);
167165
log::info!("Started job {}", id);

objdiff-gui/src/views/data_diff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ pub fn data_diff_ui(
213213
let right_ctx = SectionDiffContext::new(result.second_obj.as_ref(), section_name);
214214

215215
// If both sides are missing a symbol, switch to symbol diff view
216-
if !right_ctx.map_or(false, |ctx| ctx.has_section())
217-
&& !left_ctx.map_or(false, |ctx| ctx.has_section())
216+
if !right_ctx.is_some_and(|ctx| ctx.has_section())
217+
&& !left_ctx.is_some_and(|ctx| ctx.has_section())
218218
{
219219
return Some(DiffViewAction::Navigate(DiffViewNavigation::symbol_diff()));
220220
}

objdiff-gui/src/views/extab_diff.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub fn extab_diff_ui(
101101
let right_diff_symbol = right_ctx.and_then(|ctx| {
102102
ctx.symbol_ref.and_then(|symbol_ref| ctx.diff.symbol_diff(symbol_ref).target_symbol)
103103
});
104-
if left_diff_symbol.is_some() && right_ctx.map_or(false, |ctx| !ctx.has_symbol()) {
104+
if left_diff_symbol.is_some() && right_ctx.is_some_and(|ctx| !ctx.has_symbol()) {
105105
let (right_section, right_symbol) =
106106
right_ctx.unwrap().obj.section_symbol(left_diff_symbol.unwrap());
107107
let symbol_ref = SymbolRefByName::new(right_symbol, right_section);
@@ -111,7 +111,7 @@ pub fn extab_diff_ui(
111111
left_symbol: state.symbol_state.left_symbol.clone(),
112112
right_symbol: Some(symbol_ref),
113113
}));
114-
} else if right_diff_symbol.is_some() && left_ctx.map_or(false, |ctx| !ctx.has_symbol()) {
114+
} else if right_diff_symbol.is_some() && left_ctx.is_some_and(|ctx| !ctx.has_symbol()) {
115115
let (left_section, left_symbol) =
116116
left_ctx.unwrap().obj.section_symbol(right_diff_symbol.unwrap());
117117
let symbol_ref = SymbolRefByName::new(left_symbol, left_section);
@@ -124,8 +124,8 @@ pub fn extab_diff_ui(
124124
}
125125

126126
// If both sides are missing a symbol, switch to symbol diff view
127-
if right_ctx.map_or(false, |ctx| !ctx.has_symbol())
128-
&& left_ctx.map_or(false, |ctx| !ctx.has_symbol())
127+
if right_ctx.is_some_and(|ctx| !ctx.has_symbol())
128+
&& left_ctx.is_some_and(|ctx| !ctx.has_symbol())
129129
{
130130
return Some(DiffViewAction::Navigate(DiffViewNavigation::symbol_diff()));
131131
}
@@ -144,7 +144,7 @@ pub fn extab_diff_ui(
144144
.add_enabled(
145145
!state.scratch_running
146146
&& state.scratch_available
147-
&& left_ctx.map_or(false, |ctx| ctx.has_symbol()),
147+
&& left_ctx.is_some_and(|ctx| ctx.has_symbol()),
148148
egui::Button::new("📲 decomp.me"),
149149
)
150150
.on_hover_text_at_pointer("Create a new scratch on decomp.me (beta)")

0 commit comments

Comments
 (0)