@@ -4,7 +4,7 @@ use core::fmt;
44use ixdtf:: ParseError ;
55use timezone_provider:: TimeZoneProviderError ;
66
7- use icu_calendar:: error:: { DateFromFieldsError , DateAddError } ;
7+ use icu_calendar:: error:: { DateAddError , DateFromFieldsError } ;
88
99/// `TemporalError`'s error type.
1010#[ derive( Debug , Default , Clone , Copy , PartialEq ) ]
@@ -166,7 +166,6 @@ impl From<DateAddError> for TemporalError {
166166 }
167167}
168168
169-
170169impl From < ParseError > for TemporalError {
171170 fn from ( error : ParseError ) -> Self {
172171 TemporalError :: range ( ) . with_enum ( ErrorMessage :: Ixdtf ( error) )
@@ -271,17 +270,19 @@ impl ErrorMessage {
271270 Self :: Ixdtf ( s) => ixdtf_error_to_static_string ( s) ,
272271
273272 Self :: Icu4xDateFromFields ( DateFromFieldsError :: InvalidEra ) => "Unknown era." ,
274- Self :: Icu4xDateFromFields ( DateFromFieldsError :: InvalidDay { ..} ) | Self :: Icu4xDateAdd ( DateAddError :: InvalidDay { ..} ) => "Day out of range" ,
275- Self :: Icu4xDateFromFields ( DateFromFieldsError :: InvalidOrdinalMonth { ..} ) => "Month out of range" ,
273+ Self :: Icu4xDateFromFields ( DateFromFieldsError :: InvalidDay { .. } )
274+ | Self :: Icu4xDateAdd ( DateAddError :: InvalidDay { .. } ) => "Day out of range" ,
275+ Self :: Icu4xDateFromFields ( DateFromFieldsError :: InvalidOrdinalMonth { .. } ) => {
276+ "Month out of range"
277+ }
276278 Self :: Icu4xDateFromFields ( DateFromFieldsError :: MonthCodeInvalidSyntax ) => {
277279 "Invalid month code."
278280 }
279281 Self :: Icu4xDateFromFields ( DateFromFieldsError :: MonthNotInCalendar ) => {
280282 "Month code not in calendar."
281283 }
282- Self :: Icu4xDateFromFields ( DateFromFieldsError :: MonthNotInYear ) | Self :: Icu4xDateAdd ( DateAddError :: MonthNotInYear ) => {
283- "Month code not in year."
284- }
284+ Self :: Icu4xDateFromFields ( DateFromFieldsError :: MonthNotInYear )
285+ | Self :: Icu4xDateAdd ( DateAddError :: MonthNotInYear ) => "Month code not in year." ,
285286 Self :: Icu4xDateFromFields ( DateFromFieldsError :: InconsistentYear ) => {
286287 "Inconsistent year."
287288 }
0 commit comments