diff --git a/core/src/ipc.rs b/core/src/ipc.rs index db4fbc5..5af2989 100644 --- a/core/src/ipc.rs +++ b/core/src/ipc.rs @@ -69,7 +69,7 @@ where // Serialize the received data into T bincode::deserialize(&buffer[0..len]) - .map(|r| Some(r)) + .map(Some) .typ(SystemError::Panic) } diff --git a/hypervisor/src/hypervisor/scheduler.rs b/hypervisor/src/hypervisor/scheduler.rs index 14371ea..452bb9c 100644 --- a/hypervisor/src/hypervisor/scheduler.rs +++ b/hypervisor/src/hypervisor/scheduler.rs @@ -127,7 +127,7 @@ impl<'a> PartitionTimeframeScheduler<'a> { /// `Ok(None)`. In case of `Ok(_)` the contained value is returned as /// `Ok(Some(_))`. fn handle_partition_result(&mut self, res: TypedResult) -> LeveledResult> { - res.map(|t| Some(t)) + res.map(Some) .or_else(|err| self.partition.handle_error(err).map(|_| None)) } }