Skip to content

Commit c3ee253

Browse files
fix(wasmbus): expect when we should've mapped
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
1 parent cce9c3a commit c3ee253

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

crates/host/src/wasmbus/mod.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,7 @@ impl Host {
863863
.image_ref(component.image_reference.to_string())
864864
.annotations(component.annotations.clone().into_iter().collect())
865865
.max_instances(component.max_instances.get().try_into().unwrap_or(u32::MAX))
866-
.limits(Some(
867-
component
868-
.limits
869-
.expect("component limits should be set")
870-
.to_string_map(),
871-
))
866+
.limits(component.limits.map(|limits| limits.to_string_map()))
872867
.revision(
873868
component
874869
.claims()
@@ -1565,11 +1560,7 @@ impl Host {
15651560
Arc::clone(&new_component_ref),
15661561
Arc::clone(&component_id),
15671562
max,
1568-
Some(
1569-
existing_component
1570-
.limits
1571-
.expect("component limits should be set"),
1572-
),
1563+
existing_component.limits,
15731564
new_component,
15741565
existing_component.handler.copy_for_new(),
15751566
)

0 commit comments

Comments
 (0)