Patched the parsing code that uses time and bumped the rust version#256
Patched the parsing code that uses time and bumped the rust version#256tunafysh wants to merge 1 commit into
Conversation
|
Until this is merged: [patch.crates-io]
cookie = { git = "https://github.com/tunafysh/cookie-rs/", rev = "45612d0f23e0a077ab9c78280770ba06037e5437" } |
|
I don't think this should be fixed here but rather in the |
|
|
I think a better fix would be |
|
|
||
| pub(crate) fn parse_date(s: &str, format: &impl Parsable) -> Result<OffsetDateTime, time::Error> { | ||
| // Parse. Handle "abbreviated" dates like Chromium. See cookie#162. | ||
| let mut date = format.parse(s.as_bytes())?; |
There was a problem hiding this comment.
The solution probably should not continue to use the undocumented method with no semver guarantees. Relevant comment from the time maintainers: time-rs/time#793 (comment)
There was a problem hiding this comment.
yeah but this is meant as a temporary replacement as tauri is literally refusing to build.
There was a problem hiding this comment.
This "temporary replacement" will be broken in the future. It is not the solution you think it is. You will not get an extraordinarily clear deprecation warning.
|
See master...joshka:cookie-rs:joshka/avoid-private-time-parsing for a better approach to this that both fully avoids the problem and adds more testing to show that the parts involved are properly covered. More details in the #255 |
format.parse(s.as_bytes())toformat.parse(s.as_bytes(), None)by providing the valueNoneto thedefaultsargument.