File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -483,11 +483,11 @@ impl Body {
483
483
/// # Examples
484
484
/// ```
485
485
/// use http_types::Body;
486
- /// use http_types::mime::self ;
486
+ /// use http_types::mime;
487
487
///
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) );
491
491
/// ```
492
492
pub fn set_mime ( & mut self , mime : impl Into < Mime > ) {
493
493
self . mime = Some ( mime. into ( ) ) ;
@@ -500,7 +500,7 @@ impl Body {
500
500
/// use http_types::Body;
501
501
/// use http_types::mime;
502
502
///
503
- /// let mut body = Body::default ();
503
+ /// let mut body = Body::empty ();
504
504
/// assert!(body.mime().is_some());
505
505
///
506
506
/// body.unset_mime();
You can’t perform that action at this time.
0 commit comments