Fix a lot of errors
This commit is contained in:
@ -48,20 +48,20 @@ impl ObjAddr {
|
||||
|
||||
/// Searches for a semaphore of id **id** in self
|
||||
pub fn search_semaphore(&self, id: i32) -> Option<&mut Semaphore> {
|
||||
self.semaphores.get(&id)
|
||||
self.semaphores.get_mut(&id)
|
||||
}
|
||||
|
||||
/// Searches for a lock of id **id** in self
|
||||
pub fn search_lock(&self, id:i32) -> Option<&mut Lock> {
|
||||
self.locks.get(&id)
|
||||
self.locks.get_mut(&id)
|
||||
}
|
||||
|
||||
/// Removes the object of id **id** from self if it exists
|
||||
pub fn remove_semaphore(&mut self, id: i32) {
|
||||
pub fn remove_semaphore(&mut self, id: i32) -> Option<Semaphore> {
|
||||
self.semaphores.remove(&id)
|
||||
}
|
||||
|
||||
pub fn remove_semaphore(&mut self, id:i32) {
|
||||
pub fn remove_lock(&mut self, id:i32) -> Option<Lock> {
|
||||
self.locks.remove(&id)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user