aboutsummaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-07-22 23:14:05 +0200
committerAstatin <[email protected]>2025-07-22 23:14:05 +0200
commita5b89a18526a5b56b74f3ced3d0ebe6ad35a4551 (patch)
tree50751e0e5be68f15c666e08cde2496f72dca0a91 /src/io.rs
parent87092ea395b910c2c40c5e1244ebec51032c064a (diff)
Add headless option
Diffstat (limited to 'src/io.rs')
-rw-r--r--src/io.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/io.rs b/src/io.rs
index 730fc55..8ed35e8 100644
--- a/src/io.rs
+++ b/src/io.rs
@@ -36,6 +36,12 @@ pub trait Window {
fn update(&mut self, fb: Box<[u32; 160 * 144]>) -> Option<WindowSignal>;
}
+impl<T: Window + ?Sized> Window for Box<T> {
+ fn update(&mut self, fb: Box<[u32; 160 * 144]>) -> Option<WindowSignal> {
+ (**self).update(fb)
+ }
+}
+
pub trait Serial {
fn read_data(&self) -> u8;
fn read_control(&self) -> u8;