We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fcd45a commit 557e09eCopy full SHA for 557e09e
src/builtins/core/date.rs
@@ -114,17 +114,18 @@ macro_rules! impl_with_fallback_method {
114
Some(fallback.month_code()),
115
),
116
};
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
- })
+ #[allow(clippy::needless_update)] {
+ Ok(Self {
+ year: Some(self.year.unwrap_or(fallback.year())),
+ month,
+ month_code,
+ $($day: Some(self.day.unwrap_or(fallback.day().into())),)?
+ era,
+ era_year,
+ calendar: fallback.calendar().clone(),
+ ..Default::default()
+ })
128
+ }
129
}
130
131
0 commit comments