Skip to content

Commit

Permalink
refactor!: rename get_cancellation_token to cancellation_token (#153)
Browse files Browse the repository at this point in the history
This makes the name consistent with the other accessor methods.
  • Loading branch information
aschey authored Feb 15, 2025
1 parent 4778348 commit cd13d91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ impl<P: StorageProvider> StreamDownload<P> {
self.download_task_cancellation_token.cancel();
}

/// Get the [`CancellationToken`] for the download task.
pub fn get_cancellation_token(&self) -> CancellationToken {
/// Returns the [`CancellationToken`] for the download task.
/// This can be used to cancel the download task before it completes.
pub fn cancellation_token(&self) -> CancellationToken {
self.download_task_cancellation_token.clone()
}

Expand Down

0 comments on commit cd13d91

Please sign in to comment.