Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Nov 4, 2024
1 parent 2bebec7 commit 557cc2f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/datetime/src/format/neo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ pub enum PatternLoadError {
/// A field conflicts with a previous field.
///
/// Fields conflict if they require the same type of data, for example the
/// `EEE` and `EEEE` fields (short vs long weekday) conflict, or the `M`
/// `EEE` and `EEEE` fields (short vs long weekday) conflict, or the `M`
/// and `L` (format vs standalone month) conflict.
#[displaydoc("A field conflicts with a previous field.")]
ConflictingField(Field),
Expand Down
2 changes: 1 addition & 1 deletion ffi/capi/src/datetime_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod ffi {
use crate::{
date::ffi::{Date, IsoDate},
datetime::ffi::{DateTime, IsoDateTime},
errors::ffi::{PatternLoadError, DateTimeFormatError},
errors::ffi::{DateTimeFormatError, PatternLoadError},
locale_core::ffi::Locale,
provider::ffi::DataProvider,
time::ffi::Time,
Expand Down
6 changes: 4 additions & 2 deletions ffi/capi/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub mod ffi {
InvalidCyclicYear = 0x05,
NamesNotLoaded = 0x10,
FixedDecimalFormatterNotLoaded = 0x11,
UnsupportedField = 0x12
UnsupportedField = 0x12,
}
}

Expand Down Expand Up @@ -212,7 +212,9 @@ impl From<icu_datetime::DateTimeWriteError> for DateTimeFormatError {
icu_datetime::DateTimeWriteError::InvalidMonthCode(..) => Self::InvalidMonthCode,
icu_datetime::DateTimeWriteError::InvalidCyclicYear { .. } => Self::InvalidCyclicYear,
icu_datetime::DateTimeWriteError::NamesNotLoaded(..) => Self::NamesNotLoaded,
icu_datetime::DateTimeWriteError::FixedDecimalFormatterNotLoaded => Self::FixedDecimalFormatterNotLoaded,
icu_datetime::DateTimeWriteError::FixedDecimalFormatterNotLoaded => {
Self::FixedDecimalFormatterNotLoaded
}
icu_datetime::DateTimeWriteError::UnsupportedField(..) => Self::UnsupportedField,
_ => Self::Unknown,
}
Expand Down
4 changes: 3 additions & 1 deletion ffi/capi/src/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ pub mod ffi {
/// Create a new [`LocaleCanonicalizer`] with extended data.
#[diplomat::rust_link(icu::locale::LocaleCanonicalizer::new_with_expander, FnInStruct)]
#[diplomat::attr(supports = fallible_constructors, named_constructor = "extended")]
pub fn create_extended(provider: &DataProvider) -> Result<Box<LocaleCanonicalizer>, DataError> {
pub fn create_extended(
provider: &DataProvider,
) -> Result<Box<LocaleCanonicalizer>, DataError> {
let expander = call_constructor!(
icu_locale::LocaleExpander::new_extended [r => Ok(r)],
icu_locale::LocaleExpander::try_new_with_any_provider,
Expand Down
2 changes: 1 addition & 1 deletion ffi/capi/src/zoned_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub mod ffi {
use crate::{
datetime::ffi::{DateTime, IsoDateTime},
datetime_formatter::ffi::DateTimeLength,
errors::ffi::{PatternLoadError, DateTimeFormatError},
errors::ffi::{DateTimeFormatError, PatternLoadError},
locale_core::ffi::Locale,
provider::ffi::DataProvider,
timezone::ffi::TimeZoneInfo,
Expand Down

0 comments on commit 557cc2f

Please sign in to comment.