-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ls: update chrono crate version and switch to new_lenient
use
#7858
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
Conversation
GNU testsuite comparison:
|
src/uu/ls/src/ls.rs
Outdated
// TODO (#7802): Replace with new_lenient | ||
StrftimeItems::new(custom_tz_fmt::custom_time_format(fmt).as_str()).parse_to_owned() | ||
// Box the fmt value to make it static. | ||
StrftimeItems::new_lenient(Box::leak( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the Box::leak
change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, my bad. Was too concentrated on parse()
, missed that it can be done much simpler
I think this looks ok. @Qelxiros FYI. |
GNU testsuite comparison:
|
Thanks! |
Chrono just released a new version of their crate, introducing more flexible way to parse unknown format specifiers.
Closes #7802