summaryrefslogtreecommitdiff
path: root/rust/src/backgroundtask.rs
diff options
context:
space:
mode:
authorJosh Watson <josh@joshwatson.com>2021-03-15 10:19:02 -0700
committerKyle Martin <krm504@nyu.edu>2021-03-15 13:35:44 -0400
commit9b84739cd5d24c4439f9e009724454128d8c448a (patch)
tree7781629f1dcf5414086662a65569b20bec616501 /rust/src/backgroundtask.rs
parentf401a352f4930bc8c98ee63679fa111493018c4e (diff)
Resolve Kyle's comments
Diffstat (limited to 'rust/src/backgroundtask.rs')
-rw-r--r--rust/src/backgroundtask.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/backgroundtask.rs b/rust/src/backgroundtask.rs
index 363b91a8..dca9a5d4 100644
--- a/rust/src/backgroundtask.rs
+++ b/rust/src/backgroundtask.rs
@@ -28,7 +28,7 @@ pub struct BackgroundTask {
}
impl BackgroundTask {
- pub unsafe fn from_raw(handle: *mut BNBackgroundTask) -> Self {
+ pub(crate) unsafe fn from_raw(handle: *mut BNBackgroundTask) -> Self {
debug_assert!(!handle.is_null());
Self { handle }
@@ -67,7 +67,7 @@ impl BackgroundTask {
unsafe { BnString::from_raw(BNGetBackgroundTaskProgressText(self.handle)) }
}
- pub fn cancel(&self) {
+ pub fn cancel(&mut self) {
unsafe { BNCancelBackgroundTask(self.handle) }
}