Skip to content

Breaking change in time v0.3.52 compared to v0.3.51 #793

Description

@TobiasDeBruijn

After running cargo update just now, I ran into a compile error coming from a dependency cookie, which depends on time:

Pin time to the newest version, specifically:

$ cargo update  -p time --precise 0.3.52
    Updating crates.io index
    Updating time v0.3.51 -> v0.3.52
    Updating time-macros v0.2.30 -> v0.2.31
note: pass `--verbose` to see 4 unchanged dependencies behind latest
error[E0061]: this method takes 2 arguments but 1 argument was supplied
   --> /home/tobias/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cookie-0.16.2/src/parse.rs:263:27
    |
263 |     let mut date = format.parse(s.as_bytes())?;
    |                           ^^^^^-------------- argument #2 of type `Option<Parsed>` is missing
    |
note: method defined here
   --> /home/tobias/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/time-0.3.52/src/parsing/parsable.rs:62:12
    |
 62 |         fn parse(&self, input: &[u8], defaults: Option<Parsed>) -> Result<Parsed, error::Parse> {
    |            ^^^^^
help: provide the argument
    |
263 |     let mut date = format.parse(s.as_bytes(), /* Option<Parsed> */)?;
    |                                             ++++++++++++++++++++++

    Checking jsonwebtoken v10.4.0
For more information about this error, try `rustc --explain E0061`.
error: could not compile `cookie` (lib) due to 1 previous error

Downgrading to time v0.3.51 resolves the issue:

 $ cargo update  -p time --precise 0.3.51
    Updating crates.io index
 Downgrading time v0.3.52 -> v0.3.51
 Downgrading time-macros v0.2.31 -> v0.2.30 (available: v0.2.31)
note: pass `--verbose` to see 4 unchanged dependencies behind latest
$ cargo c
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-upstreamCategory: an issue exists in a different crate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions