From 639c25054125b4e52cf79bb68f3a67db84cd228e Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Thu, 9 May 2024 12:18:16 -0700 Subject: [PATCH] fmt --- components/datetime/src/calendar.rs | 4 +-- components/datetime/src/neo.rs | 40 ++++++++++++++++------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/components/datetime/src/calendar.rs b/components/datetime/src/calendar.rs index 14f3a8a226c..b056d148cde 100644 --- a/components/datetime/src/calendar.rs +++ b/components/datetime/src/calendar.rs @@ -19,10 +19,10 @@ use tinystr::{tinystr, TinyAsciiStr}; #[cfg(any(feature = "datagen", feature = "experimental"))] use crate::provider::neo::*; -#[cfg(any(feature = "datagen", feature = "experimental"))] -use icu_provider::NeverMarker; #[cfg(feature = "experimental")] use core::marker::PhantomData; +#[cfg(any(feature = "datagen", feature = "experimental"))] +use icu_provider::NeverMarker; /// The `CldrCalendar` trait is sealed except when the `"experimental"` Cargo /// feature is enabled. If implementing `CldrCalendar`, you must also diff --git a/components/datetime/src/neo.rs b/components/datetime/src/neo.rs index b6504fa5767..4c779a5a606 100644 --- a/components/datetime/src/neo.rs +++ b/components/datetime/src/neo.rs @@ -4,9 +4,9 @@ //! High-level entrypoints for Neo DateTime Formatter +use crate::calendar::AnyCalendarProvider; use crate::external_loaders::*; use crate::format::datetime::DateTimeWriteError; -use crate::calendar::AnyCalendarProvider; use crate::format::datetime::{try_write_field, try_write_pattern}; use crate::format::neo::*; use crate::input::ExtractedDateTimeInput; @@ -401,7 +401,7 @@ mod private { } /// A collection of types and constants for specific variants of [`TypedNeoFormatter`]. -/// +/// /// Individual fields can be [`NeverMarker`] if they are not needed for the specific variant. pub trait TypedNeoFormatterMarker: private::Sealed { /// Components in the neo skeleton. @@ -426,11 +426,11 @@ pub trait TypedNeoFormatterMarker: private::Sealed { } /// A collection of types and constants for specific variants of [`NeoFormatter`]. -/// +/// /// Individual fields can be [`NeverMarker`] if they are not needed for the specific variant. -/// +/// /// The cross-calendar fields should be either [`FullDataCalMarkers`] or [`NoDataCalMarkers`]. -/// +/// /// [`FullDataCalMarkers`]: _internal::FullDataCalMarkers /// [`NoDataCalMarkers`]: _internal::NoDataCalMarkers pub trait NeoFormatterMarker { @@ -655,7 +655,11 @@ impl> TypedNeoFormatter { } } -size_test!(NeoFormatter, neo_year_month_day_formatter_size, 512); +size_test!( + NeoFormatter, + neo_year_month_day_formatter_size, + 512 +); /// [`NeoFormatter`] is a formatter capable of formatting dates and/or times from /// a calendar selected at runtime. @@ -951,10 +955,10 @@ impl NeoFormatter { names.load_for_pattern( &AnyCalendarProvider::::new(provider, kind), // year &AnyCalendarProvider::::new(provider, kind), // month - &R::WeekdayNamesV1Marker::bind(provider), // weekday - &R::DayPeriodNamesV1Marker::bind(provider), // day period - Some(loader), // fixed decimal formatter - Some(loader), // week calculator + &R::WeekdayNamesV1Marker::bind(provider), // weekday + &R::DayPeriodNamesV1Marker::bind(provider), // day period + Some(loader), // fixed decimal formatter + Some(loader), // week calculator locale, selection.pattern_items_for_data_loading(), )?; @@ -1227,10 +1231,10 @@ impl NeoDateFormatter { names.load_for_pattern( &AnyCalendarProvider::::new(provider, kind), // year &AnyCalendarProvider::::new(provider, kind), // month - &WeekdayNamesV1Marker::bind(provider), // weekday - &PhantomProvider, // day period - Some(loader), // fixed decimal formatter - Some(loader), // week calculator + &WeekdayNamesV1Marker::bind(provider), // weekday + &PhantomProvider, // day period + Some(loader), // fixed decimal formatter + Some(loader), // week calculator locale, selection.pattern_items_for_data_loading(), )?; @@ -2584,10 +2588,10 @@ impl NeoDateTimeFormatter { names.load_for_pattern( &AnyCalendarProvider::::new(provider, kind), // year &AnyCalendarProvider::::new(provider, kind), // month - &WeekdayNamesV1Marker::bind(provider), // weekday - &DayPeriodNamesV1Marker::bind(provider), // day period - Some(loader), // fixed decimal formatter - Some(loader), // week calculator + &WeekdayNamesV1Marker::bind(provider), // weekday + &DayPeriodNamesV1Marker::bind(provider), // day period + Some(loader), // fixed decimal formatter + Some(loader), // week calculator locale, selection.pattern_items_for_data_loading(), )?;