typo fix and doc improvement

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-05-29 11:56:52 +02:00
parent 7fb49397d5
commit 390e83c9b9

View File

@ -49,6 +49,8 @@ pub struct Cancellable<T: Future> {
/// Reference to a cancellable future. Multiple instances may exist simultaneously.
///
/// This allows cancelling another future. If the future already finished, nothing happens.
///
/// This can be cloned to be used in multiple places.
#[derive(Clone)]
pub struct Canceller(Arc<Mutex<Option<AsyncLockGuard<()>>>>);
@ -76,7 +78,7 @@ impl<T: Future> Cancellable<T> {
Ok((this, canceller))
}
/// Create another `Canceller` for his future..
/// Create another `Canceller` for this future.
pub fn canceller(&self) -> Canceller {
Canceller(self.guard.clone())
}