From bcb4771278c04f417cde44c84ec6d2dba92f27e7 Mon Sep 17 00:00:00 2001 From: pwalski <4924911+pwalski@users.noreply.github.com> Date: Thu, 20 Jul 2023 13:15:59 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: nieznanysprawiciel --- runtime/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 54381c0b..733af745 100755 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -409,11 +409,7 @@ fn offer(self_test_result: serde_json::Value) -> anyhow::Result bool { - let Some(root) = self_test_result.as_object() else { - return false; - }; - - root.get("gpu").is_some() + self_test_result.as_object().and_then(|root| root.get("gpu")).is_some()| } async fn join_network(