-
Notifications
You must be signed in to change notification settings - Fork 176
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
Should NeoFormatter and TypedNeoFormatter have default generics? #5687
Comments
I don't really think there's a sensible "default" here. I think TimeFormatter is fine. I also think adding the bound may work, though it would be nice if DateTimeFormatter could |
This currently works: TypedFormatter::try_new(
locale,
fieldset::YMD::with_length(Medium)
)
.format(Date::try_new_gregorian_date(...)) This currently requires an explicit NeverCalendar: TypedFormatter::<NeverCalendar, _>::try_new(
locale,
fieldset::HM::with_length(Medium)
)
.format(Time::try_new(...)) If we had TypedFormatter::try_new(
locale,
fieldset::HM::with_length(Medium)
)
.format_time(Time::try_new(...)) |
What would
|
I don't consider this a 2.0-beta blocker. |
Shane/Rob discussion: @sffc Note: I have already replaced
Discussion:
Bikeshed:
Discussion:
Conclusion:
LGTM: @sffc @robertbastian |
Currently if you want a time formatter you need to explicitly set the calendar type to
NeverCalendar
/()
.This raises the general question, should they have default generics?
The time formatter specific concern can also be addressed by
pub type TimeFormatter
format_time
imply this bound@Manishearth @robertbastian
The text was updated successfully, but these errors were encountered: