Skip to content

Commit 1f71764

Browse files
committed
cargo fmt
1 parent b2ed522 commit 1f71764

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/builtins/core/zoned_date_time/tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ fn test_canonical_equals() {
12201220
fn hours_in_day_dst_changes() {
12211221
// Testing Sao Paolo's midnight time zone change.
12221222
// intl402/Temporal/ZonedDateTime/prototype/hoursInDay/dst-midnight
1223-
1223+
12241224
test_all_providers!(provider: {
12251225
let time_zone = TimeZone::try_from_str_with_provider("America/Sao_Paulo", provider).unwrap();
12261226
let partial = PartialZonedDateTime::new()
@@ -1250,4 +1250,3 @@ fn hours_in_day_dst_changes() {
12501250
assert_eq!(spring.hours_in_day_with_provider(provider), Ok(23.0));
12511251
})
12521252
}
1253-

zoneinfo/src/rule.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ pub struct LastRules {
1818
pub saving: Option<Rule>,
1919
}
2020

21-
impl LastRules{
22-
/// Determines the final year from the rules in `LastRules`, returning `None` if
21+
impl LastRules {
22+
/// Determines the final year from the rules in `LastRules`, returning `None` if
2323
/// the year is MAX (a.k.a., undefined).
2424
pub(crate) fn final_year(&self) -> i32 {
25-
let std_final_year = self
26-
.standard
27-
.to_year_to_u16()
28-
.map(i32::from);
25+
let std_final_year = self.standard.to_year_to_u16().map(i32::from);
2926

30-
let dst_final_year = self.saving.as_ref().map(|r| r.to_year_to_u16().map(i32::from));
27+
let dst_final_year = self
28+
.saving
29+
.as_ref()
30+
.map(|r| r.to_year_to_u16().map(i32::from));
3131
let to_year_final = if let Some(dst_year) = dst_final_year {
3232
std_final_year.max(dst_year)
3333
} else {
@@ -197,10 +197,9 @@ impl Rule {
197197
.to_universal_seconds(std_offset.as_secs(), saving.as_secs())
198198
}
199199

200-
/// Converts this Rule's `To` value into an integer.
200+
/// Converts this Rule's `To` value into an integer.
201201
pub(crate) fn to_year_to_u16(&self) -> Option<u16> {
202-
self
203-
.to
202+
self.to
204203
.map(ToYear::to_optional_u16)
205204
.unwrap_or(Some(self.from))
206205
}

zoneinfo/tests/test_datagen.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ fn test_data_for_id(identifier: &str, strict: bool) {
5353
test_data.first_record.abbr
5454
);
5555
if strict {
56-
assert_eq!(computed_zoneinfo.transitions.len(), test_data.transitions.len());
56+
assert_eq!(
57+
computed_zoneinfo.transitions.len(),
58+
test_data.transitions.len()
59+
);
5760
}
5861

5962
for (computed, test_data) in computed_zoneinfo
@@ -160,4 +163,3 @@ fn test_riga() {
160163
fn test_sao_paulo() {
161164
test_data_for_id("America/Sao_Paulo", true);
162165
}
163-

0 commit comments

Comments
 (0)