Skip to content

Commit 053a205

Browse files
committed
Fix broken doc tests
1 parent aed8bfa commit 053a205

35 files changed

+51
-51
lines changed

src/auth/authorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::headers::{Header, HeaderName, HeaderValue, Headers, AUTHORIZATION};
1313
/// ```
1414
/// # fn main() -> http_types::Result<()> {
1515
/// #
16-
/// use http_types::{headers::Header, Response};
16+
/// use http_types::Response;
1717
/// use http_types::auth::{AuthenticationScheme, Authorization};
1818
///
1919
/// let scheme = AuthenticationScheme::Basic;

src/auth/basic_auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{bail_status as bail, ensure_status as ensure};
1717
/// ```
1818
/// # fn main() -> http_types::Result<()> {
1919
/// #
20-
/// use http_types::{headers::Header, Response};
20+
/// use http_types::Response;
2121
/// use http_types::auth::{AuthenticationScheme, BasicAuth};
2222
///
2323
/// let username = "nori";

src/auth/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
//! ```
66
//! # fn main() -> http_types::Result<()> {
77
//! #
8-
//! use http_types::{headers::Header, Response};
8+
//! use http_types::Response;
99
//! use http_types::auth::{AuthenticationScheme, BasicAuth};
1010
//!
1111
//! let username = "nori";
1212
//! let password = "secret_fish!!";
1313
//! let authz = BasicAuth::new(username, password);
1414
//!
1515
//! let mut res = Response::new(200);
16-
//! authz.apply_header(&mut res);
16+
//! res.insert_header(&authz, &authz);
1717
//!
1818
//! let authz = BasicAuth::from_headers(res)?.unwrap();
1919
//!

src/auth/www_authenticate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::{auth::AuthenticationScheme, headers::Header};
1919
/// ```
2020
/// # fn main() -> http_types::Result<()> {
2121
/// #
22-
/// use http_types::{headers::Header, Response};
22+
/// use http_types::Response;
2323
/// use http_types::auth::{AuthenticationScheme, WwwAuthenticate};
2424
///
2525
/// let scheme = AuthenticationScheme::Basic;

src/cache/age.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::time::Duration;
1616
/// ```
1717
/// # fn main() -> http_types::Result<()> {
1818
/// #
19-
/// use http_types::{headers::Header, Response};
19+
/// use http_types::Response;
2020
/// use http_types::cache::Age;
2121
///
2222
/// let age = Age::from_secs(12);

src/cache/cache_control/cache_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::slice;
1515
/// ```
1616
/// # fn main() -> http_types::Result<()> {
1717
/// #
18-
/// use http_types::{headers::Header, Response};
18+
/// use http_types::Response;
1919
/// use http_types::cache::{CacheControl, CacheDirective};
2020
/// let mut entries = CacheControl::new();
2121
/// entries.push(CacheDirective::Immutable);

src/cache/clear_site_data/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use headers::Header;
2828
/// ```
2929
/// # fn main() -> http_types::Result<()> {
3030
/// #
31-
/// use http_types::{headers::Header, Response};
31+
/// use http_types::Response;
3232
/// use http_types::cache::{ClearSiteData, ClearDirective};
3333
///
3434
/// let mut entries = ClearSiteData::new();

src/cache/expires.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::time::{Duration, SystemTime};
1515
/// ```
1616
/// # fn main() -> http_types::Result<()> {
1717
/// #
18-
/// use http_types::{headers::Header, Response};
18+
/// use http_types::Response;
1919
/// use http_types::cache::Expires;
2020
/// use std::time::{SystemTime, Duration};
2121
///

src/conditional/etag.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::option;
1818
/// ```
1919
/// # fn main() -> http_types::Result<()> {
2020
/// #
21-
/// use http_types::{headers::Header, Response};
21+
/// use http_types::Response;
2222
/// use http_types::conditional::ETag;
2323
///
2424
/// let etag = ETag::new("0xcafebeef".to_string());

src/conditional/if_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::slice;
1919
/// ```
2020
/// # fn main() -> http_types::Result<()> {
2121
/// #
22-
/// use http_types::{headers::Header, Response};
22+
/// use http_types::Response;
2323
/// use http_types::conditional::{IfMatch, ETag};
2424
///
2525
/// let mut entries = IfMatch::new();

0 commit comments

Comments
 (0)