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 c2ed53d commit 1481603Copy full SHA for 1481603
src/body.rs
@@ -205,6 +205,7 @@ impl<'a> From<&'a str> for Body {
205
}
206
207
208
+// TODO: add this to the mime definition.
209
fn string_mime() -> mime::Mime {
210
let mut mime = mime::PLAIN;
211
let mut parameters = std::collections::HashMap::new();
@@ -223,6 +224,12 @@ impl From<Vec<u8>> for Body {
223
224
225
226
227
+impl From<()> for Body {
228
+ fn from(_: ()) -> Self {
229
+ Self::empty()
230
+ }
231
+}
232
+
233
impl Read for Body {
234
#[allow(missing_doc_code_examples)]
235
fn poll_read(
0 commit comments