Skip to content

Commit 57e5019

Browse files
committed
They be Arc'd
1 parent d39eab4 commit 57e5019

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ast/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ impl Pipe {
352352
})
353353
}
354354

355-
pub fn command<T: CommandRunner>(&self, key: &str) -> Option<&T> {
355+
pub fn command<T: CommandRunner>(&self, key: &str) -> Option<&Arc<T>> {
356356
self.modules
357357
.get(key)
358358
.map(|x| x as &dyn Any)
359-
.and_then(|x| x.downcast_ref::<T>())
359+
.and_then(|x| x.downcast_ref::<Arc<T>>())
360360
}
361361

362362
pub async fn create_stream(

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl Bundle {
211211
&self.pipe.defn
212212
}
213213

214-
pub fn command<T: modules::CommandRunner>(&self, key: &str) -> Option<&T> {
214+
pub fn command<T: modules::CommandRunner>(&self, key: &str) -> Option<&Arc<T>> {
215215
self.pipe.command(key)
216216
}
217217
}

0 commit comments

Comments
 (0)