Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed May 9, 2024
1 parent 4ac6ec2 commit 639c250
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
4 changes: 2 additions & 2 deletions components/datetime/src/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 22 additions & 18 deletions components/datetime/src/neo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<C: CldrCalendar>: private::Sealed {
/// Components in the neo skeleton.
Expand All @@ -426,11 +426,11 @@ pub trait TypedNeoFormatterMarker<C: CldrCalendar>: 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 {
Expand Down Expand Up @@ -655,7 +655,11 @@ impl<C: CldrCalendar, R: TypedNeoFormatterMarker<C>> TypedNeoFormatter<C, R> {
}
}

size_test!(NeoFormatter<NeoYearMonthDayMarker>, neo_year_month_day_formatter_size, 512);
size_test!(
NeoFormatter<NeoYearMonthDayMarker>,
neo_year_month_day_formatter_size,
512
);

/// [`NeoFormatter`] is a formatter capable of formatting dates and/or times from
/// a calendar selected at runtime.
Expand Down Expand Up @@ -951,10 +955,10 @@ impl<R: NeoFormatterMarker> NeoFormatter<R> {
names.load_for_pattern(
&AnyCalendarProvider::<R::Year, _>::new(provider, kind), // year
&AnyCalendarProvider::<R::Month, _>::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(),
)?;
Expand Down Expand Up @@ -1227,10 +1231,10 @@ impl NeoDateFormatter {
names.load_for_pattern(
&AnyCalendarProvider::<FullData, _>::new(provider, kind), // year
&AnyCalendarProvider::<FullData, _>::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(),
)?;
Expand Down Expand Up @@ -2584,10 +2588,10 @@ impl NeoDateTimeFormatter {
names.load_for_pattern(
&AnyCalendarProvider::<FullData, _>::new(provider, kind), // year
&AnyCalendarProvider::<FullData, _>::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(),
)?;
Expand Down

0 comments on commit 639c250

Please sign in to comment.