Fix Windows build

This commit is contained in:
Luke Street 2024-10-11 18:53:31 -06:00
parent 5a8e4cb608
commit 008c92ebd1
4 changed files with 7 additions and 4 deletions

1
Cargo.lock generated
View File

@ -2988,6 +2988,7 @@ dependencies = [
"tracing-subscriber",
"tracing-wasm",
"wgpu",
"winapi",
]
[[package]]

View File

@ -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,

View File

@ -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()?;

View File

@ -74,6 +74,9 @@ features = [
optional = true
default-features = false
[target.'cfg(windows)'.dependencies]
winapi = "0.3"
[target.'cfg(unix)'.dependencies]
exec = "0.3"