diff options
| author | Glenn Smith <glenn@vector35.com> | 2022-07-21 15:24:16 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2022-09-29 21:02:22 -0400 |
| commit | d552ae9beae6404c13548b98ec7a7ec4e6b3dd90 (patch) | |
| tree | 00a2696b2a3a33b1ac5bb058801fdea9f1a38c03 /rust/src/backgroundtask.rs | |
| parent | 2e18783a2f6e29c225d177e8a0fb866a9c9d85df (diff) | |
[Rust API] Better name for this trait fn, more CC support
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 _) |
