Skip to content

Commit ba9c3c5

Browse files
committed
[Rust] Fix OwnedBackgroundTaskGuard requiring mutable self
1 parent 4c5adeb commit ba9c3c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/src/background_task.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ pub struct OwnedBackgroundTaskGuard {
3030
}
3131

3232
impl OwnedBackgroundTaskGuard {
33-
pub fn cancel(&mut self) {
33+
pub fn cancel(&self) {
3434
self.task.cancel();
3535
}
3636

3737
pub fn is_cancelled(&self) -> bool {
3838
self.task.is_cancelled()
3939
}
4040

41-
pub fn set_progress_text(&mut self, text: &str) {
41+
pub fn set_progress_text(&self, text: &str) {
4242
self.task.set_progress_text(text);
4343
}
4444
}

0 commit comments

Comments
 (0)