From 64e75ad1b0ad089861715ddca8a5df20756792a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Sat, 1 Feb 2020 14:04:17 -0800 Subject: [PATCH] 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. --- tokio/src/time/timeout.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/src/time/timeout.rs b/tokio/src/time/timeout.rs index 561dc0ca7..7a3725440 100644 --- a/tokio/src/time/timeout.rs +++ b/tokio/src/time/timeout.rs @@ -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 ///