Skip to content

Commit 557e09e

Browse files
changed impl_with_fallback_method macro to allow clippy::needless_update
1 parent 5fcd45a commit 557e09e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/builtins/core/date.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,18 @@ macro_rules! impl_with_fallback_method {
114114
Some(fallback.month_code()),
115115
),
116116
};
117-
118-
Ok(Self {
119-
year: Some(self.year.unwrap_or(fallback.year())),
120-
month,
121-
month_code,
122-
$($day: Some(self.day.unwrap_or(fallback.day().into())),)?
123-
era,
124-
era_year,
125-
calendar: fallback.calendar().clone(),
126-
..Default::default()
127-
})
117+
#[allow(clippy::needless_update)] {
118+
Ok(Self {
119+
year: Some(self.year.unwrap_or(fallback.year())),
120+
month,
121+
month_code,
122+
$($day: Some(self.day.unwrap_or(fallback.day().into())),)?
123+
era,
124+
era_year,
125+
calendar: fallback.calendar().clone(),
126+
..Default::default()
127+
})
128+
}
128129
}
129130
};
130131
}

0 commit comments

Comments
 (0)