worked on rendering code

worked on code for libgui for rendering a user interface
This commit is contained in:
FantasyPvP
2023-04-28 00:10:20 +01:00
parent 78144a4f60
commit 0c39711875
16 changed files with 340 additions and 15 deletions
+3 -3
View File
@@ -131,14 +131,14 @@ impl TaskList {
}
pub fn add(&mut self, content: String) -> Result<(), Error> {
let task = Task::new(self.next(), content);
let id = task.taskid.clone();
let _id = task.taskid.clone();
self.tasks.push(task);
Ok(())
}
pub fn remove(&mut self, id: usize) -> Result<(), Error> {
pub fn remove(&mut self, _id: usize) -> Result<(), Error> {
for (i, task) in self.tasks.clone().iter().enumerate() {
match task.taskid {
id => { self.tasks.remove(i); },
_id => { self.tasks.remove(i); },
_ => { return Err(Error::CommandFailed(String::from("this task does not exist"))); },
}
};