Add rustfmt from relibc and apply it with cargo fmt

This commit is contained in:
Jeremy Soller
2024-01-17 13:52:01 -07:00
parent 73897bd83d
commit 45f1c4e29e
166 changed files with 7353 additions and 3851 deletions
+7 -6
View File
@@ -1,18 +1,17 @@
use alloc::sync::Arc;
use alloc::vec::Vec;
use alloc::{sync::Arc, vec::Vec};
use spin::{Mutex, MutexGuard, RwLock};
use crate::context::{self, Context};
#[derive(Debug)]
pub struct WaitCondition {
contexts: Mutex<Vec<Arc<RwLock<Context>>>>
contexts: Mutex<Vec<Arc<RwLock<Context>>>>,
}
impl WaitCondition {
pub const fn new() -> WaitCondition {
WaitCondition {
contexts: Mutex::new(Vec::new())
contexts: Mutex::new(Vec::new()),
}
}
@@ -57,7 +56,9 @@ impl WaitCondition {
drop(guard);
}
unsafe { context::switch(); }
unsafe {
context::switch();
}
let mut waited = true;
@@ -86,7 +87,7 @@ impl WaitCondition {
}
impl Drop for WaitCondition {
fn drop(&mut self){
fn drop(&mut self) {
unsafe { self.notify_signal() };
}
}