diff options
Diffstat (limited to 'rust/src/worker_thread.rs')
| -rw-r--r-- | rust/src/worker_thread.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/worker_thread.rs b/rust/src/worker_thread.rs index e0d7b0db..8fbfb8ef 100644 --- a/rust/src/worker_thread.rs +++ b/rust/src/worker_thread.rs @@ -1,4 +1,4 @@ -use crate::string::AsCStr; +use crate::string::IntoCStr; use binaryninjacore_sys::*; use std::ffi::c_void; @@ -17,7 +17,7 @@ impl WorkerThreadActionExecutor { } } -pub fn execute_on_worker_thread<F: Fn() + 'static, S: AsCStr>(name: S, f: F) { +pub fn execute_on_worker_thread<F: Fn() + 'static, S: IntoCStr>(name: S, f: F) { let boxed_executor = Box::new(WorkerThreadActionExecutor { func: Box::new(f) }); let raw_executor = Box::into_raw(boxed_executor); let name = name.to_cstr(); @@ -30,7 +30,7 @@ pub fn execute_on_worker_thread<F: Fn() + 'static, S: AsCStr>(name: S, f: F) { } } -pub fn execute_on_worker_thread_priority<F: Fn() + 'static, S: AsCStr>(name: S, f: F) { +pub fn execute_on_worker_thread_priority<F: Fn() + 'static, S: IntoCStr>(name: S, f: F) { let boxed_executor = Box::new(WorkerThreadActionExecutor { func: Box::new(f) }); let raw_executor = Box::into_raw(boxed_executor); let name = name.to_cstr(); @@ -43,7 +43,7 @@ pub fn execute_on_worker_thread_priority<F: Fn() + 'static, S: AsCStr>(name: S, } } -pub fn execute_on_worker_thread_interactive<F: Fn() + 'static, S: AsCStr>(name: S, f: F) { +pub fn execute_on_worker_thread_interactive<F: Fn() + 'static, S: IntoCStr>(name: S, f: F) { let boxed_executor = Box::new(WorkerThreadActionExecutor { func: Box::new(f) }); let raw_executor = Box::into_raw(boxed_executor); let name = name.to_cstr(); |
