From 71b2f352ccd6a637fd95dce274824fc8ad1ac08e Mon Sep 17 00:00:00 2001 From: Baptiste Date: Wed, 5 Feb 2025 17:51:26 +0100 Subject: [PATCH] Explain why len and is_empty can be None --- src/body.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/body.rs b/src/body.rs index ac1acfc7..f93f092d 100644 --- a/src/body.rs +++ b/src/body.rs @@ -451,7 +451,7 @@ impl Body { }) } - /// Get the length of the body in bytes. + /// Get the length of the body in bytes if defined. [None] if not. /// /// # Examples /// @@ -468,7 +468,7 @@ impl Body { self.length } - /// Returns `true` if the body has a length of zero, and `false` otherwise. + /// Returns `true` if the body has a length of zero, and `false` otherwise if length is defined. [None] if not. pub fn is_empty(&self) -> Option { self.length.map(|length| length == 0) }