From 4e6bed0b572ce865fa22781098e1959f6a582a16 Mon Sep 17 00:00:00 2001 From: Erin Date: Sat, 5 Nov 2022 01:40:38 +0100 Subject: [PATCH] removed module that I forgot to remove + 1.65 stuff --- ableos/src/lib.rs | 1 - ableos/src/scratchpad.rs | 4 +++- ableos/src/tests/mod.rs | 2 -- kernel/src/task.rs | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ableos/src/lib.rs b/ableos/src/lib.rs index 9eab505c..308e6311 100644 --- a/ableos/src/lib.rs +++ b/ableos/src/lib.rs @@ -97,7 +97,6 @@ pub use driver_traits::*; pub use experiments::*; pub use graphics::*; pub use kernel; -pub use kernel::messaging; // pub use kernel::panic; pub use kernel_state::*; pub use keyboard::*; diff --git a/ableos/src/scratchpad.rs b/ableos/src/scratchpad.rs index dbe877a5..173997cd 100644 --- a/ableos/src/scratchpad.rs +++ b/ableos/src/scratchpad.rs @@ -133,7 +133,9 @@ pub fn scratchpad() { let mut pci_ide_device = pci_ide_device.lock(); if let PciDevice::Ide(device) = &mut *pci_ide_device { let mut first_sector = Vec::with_capacity(512); - device.read(Channel::Primary, Drive::Master, 0, 1, &mut first_sector).unwrap(); + device + .read(Channel::Primary, Drive::Master, 0, 1, &mut first_sector) + .unwrap(); trace!("IDE Primary/Master sector 0: {first_sector:?}"); } } diff --git a/ableos/src/tests/mod.rs b/ableos/src/tests/mod.rs index 4429d367..ca8643a5 100644 --- a/ableos/src/tests/mod.rs +++ b/ableos/src/tests/mod.rs @@ -66,5 +66,3 @@ pub fn test_kernel_main(boot_info: &'static BootInfo) -> ! { loop {} } use bootloader::{entry_point, BootInfo}; - -use crate::test_main; diff --git a/kernel/src/task.rs b/kernel/src/task.rs index 5bf4eb1e..da1020ea 100644 --- a/kernel/src/task.rs +++ b/kernel/src/task.rs @@ -87,9 +87,8 @@ impl Executor { .map(|t| TaskId(self.tasks.insert(t))) .or_else(|| self.queue.pop()) { - let task = match self.tasks.get_mut(id.0) { - Some(t) => t, - None => panic!("attempted to get non-extant task with id {}", id.0), + let Some(task) = self.tasks.get_mut(id.0) else { + panic!("attempted to get non-extant task with id {}", id.0) }; let mut cx = Context::from_waker(