- added a new API for switching between terminal and application mode

- removed unneeded imports to reduce the dumb amount of warnings from the compiler
- added a bounds check in frame.rs to avoid a panic when a frame tries to render a character out of bounds, instead returning an error
This commit is contained in:
FantasyPvP
2024-03-22 00:12:15 +00:00
parent 5c6ec299ee
commit d5d9e031d5
29 changed files with 439 additions and 436 deletions
+4 -5
View File
@@ -3,12 +3,11 @@ use crate::std::application::{
Application,
Error
};
use crate::{print, println};
use crate::println;
use lazy_static::lazy_static;
use spin::Mutex;
use async_trait::async_trait;
use alloc::{
string::ToString,
borrow::ToOwned,
};
@@ -101,13 +100,13 @@ println!("\n-------------------------------------");
impl Tasks {
fn add_task(&mut self, content: String) {
TASKS.lock().add(content);
TASKS.lock().add(content).unwrap();
}
fn remove_task(&self, idx: usize) {
TASKS.lock().remove(idx);
TASKS.lock().remove(idx).unwrap();
}
fn select_task(&self, idx: i32) {
TASKS.lock().select(idx);
TASKS.lock().select(idx).unwrap();
}
}