From d552ae9beae6404c13548b98ec7a7ec4e6b3dd90 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 21 Jul 2022 15:24:16 -0400 Subject: [Rust API] Better name for this trait fn, more CC support --- rust/src/backgroundtask.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src/backgroundtask.rs') 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(initial_text: S, can_cancel: bool) -> Result> { - 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(&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 _) -- cgit v1.3.1