lint: remove some warning

This commit is contained in:
Quentin Legot
2023-04-12 15:32:46 +02:00
parent 752b70e448
commit 35736821c0
8 changed files with 14 additions and 35 deletions

View File

@ -2,7 +2,7 @@ use std::{rc::Rc, cell::{RefCell, Ref}};
use crate::{utility::{list::List, objaddr::ObjAddr}, simulator::{machine::{NUM_INT_REGS, NUM_FP_REGS, Machine}, interrupt::InterruptStatus, error::{MachineOk, MachineError}}};
use super::{thread::Thread, process::Process, synch::Semaphore};
use super::{thread::Thread, process::Process};
pub const SIMULATORSTACKSIZE: usize = 32 * 1024;
@ -273,7 +273,7 @@ impl ThreadManager {
mod test {
use std::{rc::Rc, cell::RefCell};
use crate::{simulator::{machine::Machine, loader}, kernel::{system::System, thread::Thread, process::Process, thread_manager::{ThreadManager, self}, synch::Semaphore}};
use crate::{simulator::{machine::Machine, loader}, kernel::{system::System, thread::Thread, process::Process, thread_manager::ThreadManager, synch::Semaphore}};
#[test]
fn test_thread_context() {
@ -334,7 +334,7 @@ mod test {
// Init
let mut tm = ThreadManager::new();
let mut machine = Machine::new(true);
let mut semaphore = Semaphore::new(2);
let semaphore = Semaphore::new(2);
let sema_id = tm.get_obj_addrs().add_semaphore(semaphore);
let thread1 = Rc::new(RefCell::new(Thread::new("test_semaphore_1")));
let thread2 = Rc::new(RefCell::new(Thread::new("test_semaphore_2")));