Skip to content

Commit 1209fbc

Browse files
committed
feedback
1 parent f8e415b commit 1209fbc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

components/calendar/benches/date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ fn date_benches(c: &mut Criterion) {
168168
"calendar/hebrew",
169169
&fxs,
170170
icu::calendar::cal::Hebrew,
171-
|y, m, d, c| Date::try_new(y.into(), m.into(), d, c).unwrap(),
171+
|y, m, d, _c| Date::try_new_hebrew_v2(y, m.into(), d).unwrap(),
172172
);
173173

174174
bench_calendar(

components/calendar/src/calendar_arithmetic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ impl<C: DateFieldsResolver> ArithmeticDate<C> {
447447
if ref_year.err() == Some(EcmaReferenceYearError::UseRegularIfConstrain)
448448
&& options.overflow == Some(Overflow::Constrain)
449449
{
450-
let new_valid_month = m.number().into();
450+
let new_valid_month = Month::new(m.number());
451451
valid_month = Some(new_valid_month);
452452
calendar.reference_year_from_month_day(new_valid_month, d)?
453453
} else {

components/calendar/src/tests/exhaustive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ super::test_all_cals!(
3434
#[ignore] // takes about 90 seconds in release-with-assertions
3535
fn check_from_fields<C: Calendar + Copy>(cal: C) {
3636
let months = (1..19)
37-
.flat_map(|i| [i.into(), types::Month::leap(i)].into_iter())
37+
.flat_map(|i| [types::Month::new(i), types::Month::leap(i)].into_iter())
3838
.collect::<Vec<_>>();
3939
for year in CONSTRUCTOR_YEAR_RANGE {
4040
if year % 50000 == 0 {

components/calendar/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ impl fmt::Display for MonthCode {
508508
/// * `Month::new(7)` = `M07`
509509
/// * `Month::leap(2)` = `M02L`
510510
///
511-
/// This type implements `From<u32>` producing an non-leap month, so you can simply
511+
/// This type implements `From<u8>` producing an non-leap month, so you can simply
512512
/// call `5.into()` to produce a `Month::new(5)`.
513513
///
514514
/// [Temporal]: https://tc39.es/proposal-intl-era-monthcode/

0 commit comments

Comments
 (0)