Skip to content

Commit 3aa1dcb

Browse files
committed
feat(util): add const constructor for empty Full
1 parent fed1452 commit 3aa1dcb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

http-body-util/src/full.rs

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ impl<D> Full<D>
1818
where
1919
D: Buf,
2020
{
21+
/// Create a new empty `Full`.
22+
pub const fn empty() -> Self {
23+
Full { data: None }
24+
}
25+
2126
/// Create a new `Full`.
2227
pub fn new(data: D) -> Self {
2328
let data = if data.has_remaining() {

0 commit comments

Comments
 (0)