time: Add comment about cancelation of timed out futures (#2206)

While the module documentation explains that a timed out future (as
created through the tokio::time::timeout function) is canceled, the
function's actual documentation doesn't mention that at all. This change
adds this relevant information to the documentation.
This commit is contained in:
Daniel Müller
2020-02-01 14:04:17 -08:00
committed by GitHub
parent 1a5de2c79d
commit 64e75ad1b0
+2 -1
View File
@@ -14,7 +14,8 @@ use std::task::{self, Poll};
/// Require a `Future` to complete before the specified duration has elapsed.
///
/// If the future completes before the duration has elapsed, then the completed
/// value is returned. Otherwise, an error is returned.
/// value is returned. Otherwise, an error is returned and the future is
/// canceled.
///
/// # Cancelation
///