aboutsummaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
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;