Skip to content

Commit 932ad04

Browse files
committed
unwrap() -> Result
1 parent 57ce248 commit 932ad04

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sled-agent/src/sim/server.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,13 @@ pub async fn run_standalone_server(
608608
});
609609

610610
let plan = ServicePlan { all_sleds, dns_config: dns_config.clone() };
611-
plan.to_blueprint(inventory.ledgered_sled_config.unwrap().generation)
611+
let generation = inventory
612+
.ledgered_sled_config
613+
.context(
614+
"simulated inventory does not have a ledgered sled config",
615+
)?
616+
.generation;
617+
plan.to_blueprint(generation)
612618
.context("could not construct initial blueprint")?
613619
};
614620

0 commit comments

Comments
 (0)