Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actix-http: Compilation fails #3298

Closed
crone123 opened this issue Feb 26, 2024 · 1 comment
Closed

actix-http: Compilation fails #3298

crone123 opened this issue Feb 26, 2024 · 1 comment

Comments

@crone123
Copy link

Hello,
The compilation of actix-http fails on latest rust version (macos, intel):

error[E0277]: cannot subtract `TimeDelta` from `Tm`
   --> /Users/valentin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-1.0.1/src/cookie/jar.rs:224:44
    |
224 |             cookie.set_expires(time::now() - Duration::days(365));
    |                                            ^ no implementation for `Tm - TimeDelta`
    |
    = help: the trait `Sub<TimeDelta>` is not implemented for `Tm`
    = help: the following other types implement trait `Sub<Rhs>`:
              <Tm as Sub<time::Duration>>
              <Tm as Sub>

error[E0308]: mismatched types
   --> /Users/valentin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-1.0.1/src/cookie/mod.rs:736:40
    |
736 |         self.set_expires(time::now() + twenty_years);
    |                                        ^^^^^^^^^^^^ expected `Duration`, found `TimeDelta`

Actix web verison: 2.0.0
Actix http version: 1.0.1

Tested versions:
Rust: rustc 1.70.0 (90c541806 2023-05-31)
Rust: rustc 1.76.0 (07dca489a 2024-02-04)
Rust: rustc 1.78.0-nightly (381d69953 2024-02-24)

Environnement:
MacOS: 13.6.4 (22G513), Intel

Thanks for checking 🙏

@robjtede
Copy link
Member

duplicate of #3135

see #3135 (comment)

@robjtede robjtede closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants