Skip to content

Commit abefece

Browse files
committed
Fix errors in doc tests
1 parent 6153663 commit abefece

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/body.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,11 @@ impl Body {
483483
/// # Examples
484484
/// ```
485485
/// use http_types::Body;
486-
/// use http_types::mime::self;
486+
/// use http_types::mime;
487487
///
488-
/// let mut body = Body::default();
489-
/// body.set_mime(Some(mime::CSS));
490-
/// assert_eq!(*body.mime(), mime::CSS);
488+
/// let mut body = Body::empty();
489+
/// body.set_mime(mime::CSS);
490+
/// assert_eq!(body.mime(), Some(&mime::CSS));
491491
/// ```
492492
pub fn set_mime(&mut self, mime: impl Into<Mime>) {
493493
self.mime = Some(mime.into());
@@ -500,7 +500,7 @@ impl Body {
500500
/// use http_types::Body;
501501
/// use http_types::mime;
502502
///
503-
/// let mut body = Body::default();
503+
/// let mut body = Body::empty();
504504
/// assert!(body.mime().is_some());
505505
///
506506
/// body.unset_mime();

0 commit comments

Comments
 (0)