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
Hello. I like using axum to design some stuff, but their implementation of cookies (axum-extra::extract::cookies) doesn't automatically re-export time.
I know that I could simply ask them to export time or include it myself, but considering that all the uses of max-age could be accomplished with std::time::Duration (I read the source code) and, IMO, std::time::Duration is better because it receives first-party support from the rust developers, I think it would be reasonable.
If you liked, I could open a pr with this.
The text was updated successfully, but these errors were encountered:
std::time is not actively maintained or improved, so it does not particularly receive first-part support from the Rust team. All maintenance and improvements were punted to the time crate, which itself became stale but was eventually taken over and is now maintained. Furthermore, std::time does not contain the functionality we need, in particular, parsing and manipulation of times and duration, so we simply cannot use it as-is in cookie.
You might consider taking advantage of the several TryFrom implementations in time for std::time types. For instance, something like the following might work:
Hello. I like using
axum
to design some stuff, but their implementation of cookies (axum-extra::extract::cookies
) doesn't automatically re-exporttime
.I know that I could simply ask them to export time or include it myself, but considering that all the uses of
max-age
could be accomplished withstd::time::Duration
(I read the source code) and, IMO,std::time::Duration
is better because it receives first-party support from the rust developers, I think it would be reasonable.If you liked, I could open a pr with this.
The text was updated successfully, but these errors were encountered: