Skip to content

Commit ada8d0f

Browse files
committed
docs(runtime): clarify the preset add-on lifetime comment
1 parent b14414e commit ada8d0f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crates/nexum-runtime/src/builder.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,8 @@ impl<'a, R: Runtime> PresetBuilder<'a, R> {
377377
};
378378
let components = R::components().build::<R::Types>(&build_ctx).await?;
379379

380-
// The preset owns its add-ons; the launcher borrows each one to
381-
// install it, so both the owned set and the ref view stay live across
382-
// the launch await.
380+
// `add_ons` owns the boxed add-ons; `add_on_refs` borrows into it and is
381+
// consumed by the launch call, so both must stay in scope for that call.
383382
let add_ons = R::add_ons();
384383
let add_on_refs: Vec<&dyn RuntimeAddOn> = add_ons.iter().map(|a| &**a).collect();
385384

0 commit comments

Comments
 (0)