Skip to content

Compilation issue due to update in time #255

Description

@TobiasDeBruijn

Due to an update in the time crate, since v0.3.52, the cookie crate no longer compiles:

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> */)?;
    |                                             ++++++++++++++++++++++

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

As per the time author, this is on Cookie to fix:

This is due to cookie relying on an internal API. Please report the issue there, as that's where the issue lies. I have never documented the existence of that method, nor have I ever guaranteed anything regarding semver on that front.

Relevant issue on time's GitHub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions