Shane F. Carr

Results 2307 comments of Shane F. Carr

I'm against adding new variants to `DateError` if it causes existing call sites with non-exhaustive matching on error variants to start falling into the catchall variant. And my position on...

Also consider making an `error` module as suggested by @Manishearth in https://github.com/unicode-org/icu4x/pull/7012#discussion_r2407180399

ok so in terms of new APIs in 2.1, it is only `Date::try_from_fields` that needs to have a new error type. We'll need to answer this question for `Date::try_add` in...

I'm leaning toward expanding all six variants, because I think we may eventually want to get rid of `DateError`, and because I think I want to make `Range` into its...

After #7100, still want to add more testing around making sure the correct month code error type is returned in various month code scenarios.

Some open questions from #7100: - (2.1 blocking) Name of the month code error variants. I have `InvalidMonthCode`, `UnknownMonthCodeForCalendar`, `UnknownMonthCodeForYear`. Please paint the shed. https://github.com/unicode-org/icu4x/pull/7100#discussion_r2431986264 - (2.1 blocking) Should `InvalidMonthCode`...

My initial positions: > * (2.1 blocking) Name of the month code error variants. I have `InvalidMonthCode`, `UnknownMonthCodeForCalendar`, `UnknownMonthCodeForYear`. Please paint the shed. How about: - `DateFromFieldsError::MonthCodeSyntax` - `DateFromFieldsError::MonthCodeNotInCalendar` -...

Also, I wanted to highlight another question, just to make sure: if _ordinal_ month is used as input, and it is too big (or zero), do we agree to return...

Starting point: ```rust #[non_exhaustive] pub enum DateFromFieldsError { Range(RangeError), UnknownEra, InvalidMonthCode, UnknownMonthCodeForCalendar, // MonthCodeNotInCalendar UnknownMonthCodeForYear, // MonthCodeNotInYear InconsistentYear, InconsistentMonth, NotEnoughFields, } enum DateError { Range { field: &'static str, value:...