diff --git a/src/scheme/proc.rs b/src/scheme/proc.rs index 47588e10d2..51d49a2d29 100644 --- a/src/scheme/proc.rs +++ b/src/scheme/proc.rs @@ -1240,7 +1240,7 @@ impl ContextHandle { } else { let mut ctxt = context.write(token.token()); //trace!("FORCEKILL NONSELF={} {}, SELF={}", ctxt.debug_id, ctxt.pid, context::current().read().debug_id); - if let context::Status::Dead { .. } = ctxt.status { + if ctxt.status.is_dead() { return Ok(size_of::()); } ctxt.status = context::Status::Runnable; diff --git a/src/scheme/sys/stat.rs b/src/scheme/sys/stat.rs index 877d252f4f..6e094280a6 100644 --- a/src/scheme/sys/stat.rs +++ b/src/scheme/sys/stat.rs @@ -86,9 +86,9 @@ fn get_contexts_stats(token: &mut CleanLockToken) -> (u64, u64) { }; for status in statuses { - if matches!(status, Status::Runnable) { + if status.is_runnable() { running += 1; - } else if !matches!(status, Status::Dead { .. }) { + } else if !status.is_dead() { blocked += 1; } }