diff options
Diffstat (limited to 'rust/src/backgroundtask.rs')
| -rw-r--r-- | rust/src/backgroundtask.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/backgroundtask.rs b/rust/src/backgroundtask.rs index 234bc623..e3bd407d 100644 --- a/rust/src/backgroundtask.rs +++ b/rust/src/backgroundtask.rs @@ -36,7 +36,7 @@ impl BackgroundTask { } pub fn new<S: BnStrCompatible>(initial_text: S, can_cancel: bool) -> Result<Ref<Self>> { - let text = initial_text.as_bytes_with_nul(); + let text = initial_text.into_bytes_with_nul(); let handle = unsafe { BNBeginBackgroundTask(text.as_ref().as_ptr() as *mut _, can_cancel) }; @@ -72,7 +72,7 @@ impl BackgroundTask { } pub fn set_progress_text<S: BnStrCompatible>(&self, text: S) { - let progress_text = text.as_bytes_with_nul(); + let progress_text = text.into_bytes_with_nul(); unsafe { BNSetBackgroundTaskProgressText(self.handle, progress_text.as_ref().as_ptr() as *mut _) |
