Skip to content

Commit 71b2f35

Browse files
author
Baptiste
committed
Explain why len and is_empty can be None
1 parent ac5d645 commit 71b2f35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/body.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl Body {
451451
})
452452
}
453453

454-
/// Get the length of the body in bytes.
454+
/// Get the length of the body in bytes if defined. [None] if not.
455455
///
456456
/// # Examples
457457
///
@@ -468,7 +468,7 @@ impl Body {
468468
self.length
469469
}
470470

471-
/// Returns `true` if the body has a length of zero, and `false` otherwise.
471+
/// Returns `true` if the body has a length of zero, and `false` otherwise if length is defined. [None] if not.
472472
pub fn is_empty(&self) -> Option<bool> {
473473
self.length.map(|length| length == 0)
474474
}

0 commit comments

Comments
 (0)