You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the code around page 18 gives me the following error:
error[E0277]: cannot subtract `chrono::Duration` from `Tm`
cookie.set_expires(time::now() - Duration::days(365));
| ^ no implementation for `Tm - chrono::Duration`
|
= help: the trait `Sub<chrono::Duration>` is not implemented for `Tm`
= help: the following other types implement trait `Sub<Rhs>`:
<Tm as Sub<time::Duration>>
<Tm as Sub>
Running the code around page 18 gives me the following error:
The compiler doesn't even reach my code, so it must be an issue with dependencies.
Based on this Reddit post, other people are getting the same error:
https://www.reddit.com/r/rust/comments/17djgjd/working_through_programming_rust_2nd_edition_got/
Adding this dependency fixes the issue:
chrono = { version = "= 0.4.29" }
The text was updated successfully, but these errors were encountered: