Skip to content

Commit

Permalink
Reexport 'time' from crate root.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Aug 18, 2021
1 parent 5e616c3 commit cbd84ff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
16 changes: 4 additions & 12 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ use crate::{Cookie, SameSite, Expiration};
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::Cookie;
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let cookie: Cookie = Cookie::build("name", "value")
Expand Down Expand Up @@ -61,10 +59,8 @@ impl<'c> CookieBuilder<'c> {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
/// use time::OffsetDateTime;
///
/// use cookie::{Cookie, Expiration};
/// use cookie::time::OffsetDateTime;
///
/// # fn main() {
/// let c = Cookie::build("foo", "bar")
Expand Down Expand Up @@ -92,10 +88,8 @@ impl<'c> CookieBuilder<'c> {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
/// use time::Duration;
///
/// use cookie::Cookie;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let c = Cookie::build("foo", "bar")
Expand Down Expand Up @@ -211,10 +205,8 @@ impl<'c> CookieBuilder<'c> {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::Cookie;
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let c = Cookie::build("foo", "bar")
Expand Down
8 changes: 2 additions & 6 deletions src/jar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,8 @@ impl CookieJar {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::{CookieJar, Cookie};
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let mut jar = CookieJar::new();
Expand Down Expand Up @@ -248,10 +246,8 @@ impl CookieJar {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::{CookieJar, Cookie};
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let mut jar = CookieJar::new();
Expand Down
17 changes: 6 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
#![doc(html_root_url = "https://docs.rs/cookie/0.16")]
#![deny(missing_docs)]

pub use time;

mod builder;
mod parse;
mod jar;
Expand Down Expand Up @@ -704,10 +706,8 @@ impl<'c> Cookie<'c> {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::Cookie;
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let mut c = Cookie::new("name", "value");
Expand Down Expand Up @@ -806,9 +806,8 @@ impl<'c> Cookie<'c> {
///
/// ```
/// # extern crate cookie;
/// extern crate time;
/// use cookie::{Cookie, Expiration};
/// use time::{Duration, OffsetDateTime};
/// use cookie::time::{Duration, OffsetDateTime};
///
/// let mut c = Cookie::new("name", "value");
/// assert_eq!(c.expires(), None);
Expand Down Expand Up @@ -857,10 +856,8 @@ impl<'c> Cookie<'c> {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::Cookie;
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let mut c = Cookie::new("foo", "bar");
Expand All @@ -885,10 +882,8 @@ impl<'c> Cookie<'c> {
///
/// ```rust
/// # extern crate cookie;
/// extern crate time;
///
/// use cookie::Cookie;
/// use time::Duration;
/// use cookie::time::Duration;
///
/// # fn main() {
/// let mut c = Cookie::new("foo", "bar");
Expand Down

0 comments on commit cbd84ff

Please sign in to comment.