- 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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user