File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ use std::convert::TryInto;
14
14
/// ```
15
15
/// # fn main() -> http_types::Result<()> {
16
16
/// #
17
- /// use http_types::Response;
17
+ /// use http_types::{ Response,Url} ;
18
18
/// use http_types::content::{ContentLocation};
19
19
///
20
20
/// let content_location = ContentLocation::new("https://example.net/".to_string());
21
21
///
22
22
/// let mut res = Response::new(200);
23
23
/// content_location.apply(&mut res);
24
24
///
25
- /// let content_location = ContentLocation::from_headers(res)?.unwrap();
25
+ /// let content_location = ContentLocation::from_headers(Url::parse("https://example.net/").unwrap(), res)?.unwrap();
26
26
/// assert_eq!(content_location.location(), "https://example.net/");
27
27
/// #
28
28
/// # Ok(()) }
You can’t perform that action at this time.
0 commit comments