We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df1095d commit f61708bCopy full SHA for f61708b
src/http/body.rs
@@ -34,6 +34,12 @@ impl Default for Body {
34
}
35
36
37
+impl Default for Body {
38
+ fn default() -> Body {
39
+ Body::empty()
40
+ }
41
+}
42
+
43
impl Stream for Body {
44
type Item = Chunk;
45
type Error = ::Error;
@@ -107,6 +113,12 @@ impl From<&'static str> for Body {
107
113
108
114
109
115
116
+impl From<Option<Body>> for Body {
117
+ fn from (body: Option<Body>) -> Body {
118
+ body.unwrap_or_default()
119
120
121
110
122
fn _assert_send_sync() {
111
123
fn _assert_send<T: Send>() {}
112
124
fn _assert_sync<T: Sync>() {}
0 commit comments