From 281a8462b596925c909558653e9ba35fbffa4887 Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Sun, 21 Feb 2021 11:34:27 +0100 Subject: [PATCH] Clarify doc Close #326 --- src/response.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/response.rs b/src/response.rs index 1f50c1b..c68a5e8 100644 --- a/src/response.rs +++ b/src/response.rs @@ -28,6 +28,12 @@ pub const DEFAULT_CHARACTER_SET: &str = "utf-8"; /// [`into_reader()`](#method.into_reader), [`into_json()`](#method.into_json), or /// [`into_string()`](#method.into_string) consumes the response. /// +/// When dropping a `Response` instance, one one of two things can happen. If +/// the response has unread bytes, the underlying socket cannot be reused, +/// and the connection is closed. If there are no unread bytes, the connection +/// is returned to the [`Agent`](crate::Agent) connection pool used (notice there is always +/// an agent present, also when not explicitly configured by the user). +/// /// ``` /// # fn main() -> Result<(), ureq::Error> { /// # ureq::is_test(true);