diff --git a/Cargo.lock b/Cargo.lock index 6cbd033..601710e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2988,6 +2988,7 @@ dependencies = [ "tracing-subscriber", "tracing-wasm", "wgpu", + "winapi", ] [[package]] diff --git a/objdiff-cli/src/cmd/diff.rs b/objdiff-cli/src/cmd/diff.rs index 92af5a1..409c0e7 100644 --- a/objdiff-cli/src/cmd/diff.rs +++ b/objdiff-cli/src/cmd/diff.rs @@ -374,8 +374,7 @@ fn run_interactive( })?; } loop { - let has_event = event::poll(Duration::from_millis(100))?; - if has_event { + if event::poll(Duration::from_millis(100))? { match view.handle_event(&mut state, event::read()?) { EventControlFlow::Break => break 'outer, EventControlFlow::Continue(r) => result = r, diff --git a/objdiff-core/src/jobs/update.rs b/objdiff-core/src/jobs/update.rs index a6427b3..8fe290f 100644 --- a/objdiff-core/src/jobs/update.rs +++ b/objdiff-core/src/jobs/update.rs @@ -1,6 +1,6 @@ use std::{ env::{current_dir, current_exe}, - fs::{File, Permissions}, + fs::File, path::PathBuf, sync::mpsc::Receiver, task::Waker, @@ -51,7 +51,7 @@ fn run_update( #[cfg(unix)] { use std::{fs, os::unix::fs::PermissionsExt}; - fs::set_permissions(&target_file, Permissions::from_mode(0o755))?; + fs::set_permissions(&target_file, fs::Permissions::from_mode(0o755))?; } tmp_dir.close()?; diff --git a/objdiff-gui/Cargo.toml b/objdiff-gui/Cargo.toml index 136901f..737185b 100644 --- a/objdiff-gui/Cargo.toml +++ b/objdiff-gui/Cargo.toml @@ -74,6 +74,9 @@ features = [ optional = true default-features = false +[target.'cfg(windows)'.dependencies] +winapi = "0.3" + [target.'cfg(unix)'.dependencies] exec = "0.3"