Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Oct 17, 2024
1 parent 35807ec commit 32bc147
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions components/datetime/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,18 @@ pub fn parse_zoned_gregorian_from_str(input: &str) -> CustomZonedDateTime<Gregor
Err(icu_timezone::ParseError::MismatchedTimeZoneFields) => {
match CustomZonedDateTime::try_iso_from_str(input) {
Ok(zdt) => zdt,
Err(icu_timezone::ParseError::MismatchedTimeZoneFields) => match CustomZonedDateTime::try_location_only_iso_from_str(input) {
Ok(zdt) => {
CustomZonedDateTime {
date: zdt.date,
time: zdt.time,
// For fixture tests, set the zone variant to standard here
zone: zdt.zone.with_zone_variant(ZoneVariant::standard())
Err(icu_timezone::ParseError::MismatchedTimeZoneFields) => {
match CustomZonedDateTime::try_location_only_iso_from_str(input) {
Ok(zdt) => {
CustomZonedDateTime {
date: zdt.date,
time: zdt.time,
// For fixture tests, set the zone variant to standard here
zone: zdt.zone.with_zone_variant(ZoneVariant::standard()),
}
}
},
Err(e) => panic!("could not parse input: {input}: {e:?}"),
Err(e) => panic!("could not parse input: {input}: {e:?}"),
}
}
Err(e) => panic!("could not parse input: {input}: {e:?}"),
}
Expand Down

0 comments on commit 32bc147

Please sign in to comment.