summaryrefslogtreecommitdiff
path: root/examples/doom/src/main.rs
diff options
context:
space:
mode:
authorHenry <mail@henrygressmann.de>2026-08-10 16:21:47 +0200
committerHenry <mail@henrygressmann.de>2026-08-10 16:21:47 +0200
commit70c5bb2e4816f7ee458a6180845af3bd6b1d2d1d (patch)
treeefaff316f2fb7a84d641faf70c20d49ead3c0cbc /examples/doom/src/main.rs
parent666c7f59301acc9fcef10ac2da5beb464e57d665 (diff)
chore: cleanup tests / devdeps, fix doom example
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'examples/doom/src/main.rs')
-rw-r--r--examples/doom/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/doom/src/main.rs b/examples/doom/src/main.rs
index 095183d..c5e49b5 100644
--- a/examples/doom/src/main.rs
+++ b/examples/doom/src/main.rs
@@ -4,7 +4,7 @@ use std::num::NonZeroU32;
use std::path::{Path, PathBuf};
use std::rc::Rc;
-use eyre::{ContextCompat, Result, bail, eyre};
+use anyhow::{Context, Result, anyhow, bail};
use runtime::{Runtime, SCREEN_HEIGHT, SCREEN_WIDTH};
use softbuffer::{Context as SoftbufferContext, Surface};
use winit::application::ApplicationHandler;
@@ -60,10 +60,10 @@ impl DoomApp {
surface
.resize(NonZeroU32::new(SCREEN_WIDTH as u32).unwrap(), NonZeroU32::new(SCREEN_HEIGHT as u32).unwrap())
- .map_err(|err| eyre!(err.to_string()))?;
- let mut buffer = surface.buffer_mut().map_err(|err| eyre!(err.to_string()))?;
+ .map_err(|err| anyhow!(err.to_string()))?;
+ let mut buffer = surface.buffer_mut().map_err(|err| anyhow!(err.to_string()))?;
self.runtime.write_framebuffer(&mut buffer)?;
- buffer.present().map_err(|err| eyre!(err.to_string()))?;
+ buffer.present().map_err(|err| anyhow!(err.to_string()))?;
Ok(())
}
}
@@ -129,7 +129,7 @@ impl ApplicationHandler for DoomApp {
window.request_redraw();
}
- if self.runtime.host_state.borrow().exit_code.is_some() {
+ if self.runtime.host_state.lock().unwrap().exit_code.is_some() {
event_loop.exit();
}
}