From ff72f3be107e94a0be41a1e7ba113000a4e95089 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Mon, 11 Aug 2025 15:45:38 -0700 Subject: Deprecate Workflow::Instance in favor of Workflow::Get and Workflow::GetOrCreate Calls to `Workflow::Instance` that were looking up a built-in workflow name are updated to use `Workflow::Get`. Others use `Workflow::GetOrCreate`. --- rust/src/workflow.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'rust/src') diff --git a/rust/src/workflow.rs b/rust/src/workflow.rs index 2c03a482..49c5760e 100644 --- a/rust/src/workflow.rs +++ b/rust/src/workflow.rs @@ -204,9 +204,8 @@ impl Workflow { /// Get an existing [Workflow] by name. pub fn get(name: &str) -> Option> { - // TODO: BNWorkflowInstance has get-or-create semantics. There is currently no way to just get. let name = name.to_cstr(); - let result = unsafe { BNWorkflowInstance(name.as_ptr()) }; + let result = unsafe { BNWorkflowGet(name.as_ptr()) }; let handle = NonNull::new(result)?; Some(unsafe { Workflow::ref_from_raw(handle) }) } -- cgit v1.3.1