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
I made a few attempts since we talk about it but it is utterly complicated and will be a pain to maintain (if achievable at all).
Using a build.rs you can't just use types inside the crate itself and I need them to parse the formats
Slitting the crate could work in modern versions of Rust but there are compatibility issues with Rust v1.13, most notably with the include! that behaves a bit differently (ofc we don't need locales in 1.13 but I still needed to some includes! to avoid code duplication)
I saw yesterday that we can do more with const fn which makes it a great candidate but there are still some barriers to make it work: you can't mutate yet but we need it for the Iterator. (I think we would still need a build.rs to generate the code but it will be way less problematic.)
I don't have a solution for now that wouldn't involve huge changes on chrono. We should keep this issue open so if there are new changes in the futures we might be able to find a good solution.
The text was updated successfully, but these errors were encountered:
Since #1152 we no longer allocate Vec's for the localized formatting strings, but just switch to parsing one if we encounter the corresponding specifier.
The idea to pre-parse all format strings into slices of [Item]'s seems less ideal to me: the size of an Item is 24 bytes, while a formatting specifier may only need two bytes (like %Y). And a literal like - needs only one byte, while Item::Literal needs 24 bytes and a place to but the slice with "-". So that would blow up the size of the binary unnecessary.
Following our conversation on #453 (comment)
I made a few attempts since we talk about it but it is utterly complicated and will be a pain to maintain (if achievable at all).
const fn
which makes it a great candidate but there are still some barriers to make it work: you can't mutate yet but we need it for the Iterator. (I think we would still need a build.rs to generate the code but it will be way less problematic.)I don't have a solution for now that wouldn't involve huge changes on chrono. We should keep this issue open so if there are new changes in the futures we might be able to find a good solution.
The text was updated successfully, but these errors were encountered: