merge commit. probably broken tbh
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
use super::{
|
||||
render::{ColouredChar, RenderError},
|
||||
window::Window,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
pub struct Frame<'f> {
|
||||
data: Vec<Vec<ColouredChar>>,
|
||||
window: &'f Window,
|
||||
}
|
||||
|
||||
impl Frame<'_> {
|
||||
pub fn render(&self) -> Result<(), RenderError> {
|
||||
let data: Vec<&[ColouredChar]> = self.data.iter().map(|v| v.as_slice()).collect::<Vec<_>>();
|
||||
self.window
|
||||
.render(data.as_slice())
|
||||
.map_err(|_| RenderError::Generic)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user