Hide runner context storage details

This commit is contained in:
andrussal 2026-03-08 13:22:16 +01:00
parent 365526d236
commit 743e31fa3c

View File

@ -45,8 +45,8 @@ impl<E: Application> Runner<E> {
/// Access the underlying run context. /// Access the underlying run context.
#[must_use] #[must_use]
pub fn context(&self) -> Arc<RunContext<E>> { pub fn context(&self) -> &RunContext<E> {
Arc::clone(&self.context) self.context.as_ref()
} }
pub async fn wait_network_ready(&self) -> Result<(), DynError> { pub async fn wait_network_ready(&self) -> Result<(), DynError> {
@ -71,7 +71,7 @@ impl<E: Application> Runner<E> {
where where
Caps: Send + Sync, Caps: Send + Sync,
{ {
let context = self.context(); let context = Arc::clone(&self.context);
let run_duration = scenario.duration(); let run_duration = scenario.duration();
let workloads = scenario.workloads().to_vec(); let workloads = scenario.workloads().to_vec();
let expectation_count = scenario.expectations().len(); let expectation_count = scenario.expectations().len();