Skip to content

Commit

Permalink
Fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Oct 12, 2024
1 parent 5a8e4cb commit 008c92e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions objdiff-cli/src/cmd/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions objdiff-core/src/jobs/update.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{
env::{current_dir, current_exe},
fs::{File, Permissions},
fs::File,
path::PathBuf,
sync::mpsc::Receiver,
task::Waker,
Expand Down Expand Up @@ -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()?;

Expand Down
3 changes: 3 additions & 0 deletions objdiff-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ features = [
optional = true
default-features = false

[target.'cfg(windows)'.dependencies]
winapi = "0.3"

[target.'cfg(unix)'.dependencies]
exec = "0.3"

Expand Down

0 comments on commit 008c92e

Please sign in to comment.