From 0a6da3322c83b6cfbe9fad4cf1b5033514cbc26f Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Wed, 20 Nov 2024 14:33:40 -0800 Subject: [PATCH] Remove "Is" prefix --- components/datetime/src/neo.rs | 6 ++--- components/datetime/src/pattern/formatter.rs | 4 +-- components/datetime/src/scaffold/calendar.rs | 28 ++++++++++---------- components/datetime/src/scaffold/mod.rs | 4 +-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/components/datetime/src/neo.rs b/components/datetime/src/neo.rs index 5df2e37e8ad..bd1e676fb13 100644 --- a/components/datetime/src/neo.rs +++ b/components/datetime/src/neo.rs @@ -14,7 +14,7 @@ use crate::raw::neo::*; use crate::scaffold::*; use crate::scaffold::{ AllInputMarkers, ConvertCalendar, DateDataMarkers, DateInputMarkers, DateTimeMarkers, GetField, - IsInCalendar, IsInFixedCalendar, TimeMarkers, TypedDateDataMarkers, ZoneMarkers, + InCalendar, InFixedCalendar, TimeMarkers, TypedDateDataMarkers, ZoneMarkers, }; use crate::size_test_macro::size_test; use crate::DateTimeWriteError; @@ -330,7 +330,7 @@ where /// ``` pub fn format(&self, input: &I) -> FormattedDateTime where - I: ?Sized + IsInFixedCalendar + AllInputMarkers, + I: ?Sized + InFixedCalendar + AllInputMarkers, { let input = ExtractedInput::extract_from_neo_input::(input); FormattedDateTime { @@ -563,7 +563,7 @@ where datetime: &I, ) -> Result where - I: ?Sized + IsInCalendar + AllInputMarkers, + I: ?Sized + InCalendar + AllInputMarkers, { datetime.check_any_calendar_kind(self.calendar.kind())?; let datetime = diff --git a/components/datetime/src/pattern/formatter.rs b/components/datetime/src/pattern/formatter.rs index b912b87eab7..f601f14a3cd 100644 --- a/components/datetime/src/pattern/formatter.rs +++ b/components/datetime/src/pattern/formatter.rs @@ -8,7 +8,7 @@ use crate::format::datetime::try_write_pattern_items; use crate::input::ExtractedInput; use crate::scaffold::*; use crate::scaffold::{ - AllInputMarkers, DateInputMarkers, DateTimeMarkers, IsInFixedCalendar, TimeMarkers, + AllInputMarkers, DateInputMarkers, DateTimeMarkers, InFixedCalendar, TimeMarkers, TypedDateDataMarkers, ZoneMarkers, }; use crate::DateTimeWriteError; @@ -195,7 +195,7 @@ where /// ``` pub fn format(&self, datetime: &I) -> FormattedDateTimePattern<'a> where - I: ?Sized + IsInFixedCalendar + AllInputMarkers, + I: ?Sized + InFixedCalendar + AllInputMarkers, { FormattedDateTimePattern { pattern: self.inner.pattern, diff --git a/components/datetime/src/scaffold/calendar.rs b/components/datetime/src/scaffold/calendar.rs index d4f1836ee07..aac81dcb3d2 100644 --- a/components/datetime/src/scaffold/calendar.rs +++ b/components/datetime/src/scaffold/calendar.rs @@ -439,7 +439,7 @@ impl ConvertCalendar for TimeZoneInfo { } /// An input that may be associated with a specific runtime calendar. -pub trait IsInCalendar { +pub trait InCalendar { /// Checks whether this type is compatible with the given calendar. /// /// Types that are agnostic to calendar systems should return `Ok(())`. @@ -449,7 +449,7 @@ pub trait IsInCalendar { ) -> Result<(), MismatchedCalendarError>; } -impl> IsInCalendar for Date { +impl> InCalendar for Date { #[inline] fn check_any_calendar_kind( &self, @@ -466,14 +466,14 @@ impl> IsInCalendar for Date { } } -impl IsInCalendar for Time { +impl InCalendar for Time { #[inline] fn check_any_calendar_kind(&self, _: AnyCalendarKind) -> Result<(), MismatchedCalendarError> { Ok(()) } } -impl> IsInCalendar for DateTime { +impl> InCalendar for DateTime { #[inline] fn check_any_calendar_kind( &self, @@ -490,21 +490,21 @@ impl> IsInCalendar for DateTime { } } -impl, Z> IsInCalendar for CustomZonedDateTime { +impl, Z> InCalendar for CustomZonedDateTime { #[inline] fn check_any_calendar_kind(&self, _: AnyCalendarKind) -> Result<(), MismatchedCalendarError> { Ok(()) } } -impl IsInCalendar for UtcOffset { +impl InCalendar for UtcOffset { #[inline] fn check_any_calendar_kind(&self, _: AnyCalendarKind) -> Result<(), MismatchedCalendarError> { Ok(()) } } -impl IsInCalendar for TimeZoneInfo { +impl InCalendar for TimeZoneInfo { #[inline] fn check_any_calendar_kind(&self, _: AnyCalendarKind) -> Result<(), MismatchedCalendarError> { Ok(()) @@ -512,19 +512,19 @@ impl IsInCalendar for TimeZoneInfo { } /// An input associated with a fixed, static calendar. -pub trait IsInFixedCalendar {} +pub trait InFixedCalendar {} -impl> IsInFixedCalendar for Date {} +impl> InFixedCalendar for Date {} -impl IsInFixedCalendar for Time {} +impl InFixedCalendar for Time {} -impl> IsInFixedCalendar for DateTime {} +impl> InFixedCalendar for DateTime {} -impl, Z> IsInFixedCalendar +impl, Z> InFixedCalendar for CustomZonedDateTime { } -impl IsInFixedCalendar for UtcOffset {} +impl InFixedCalendar for UtcOffset {} -impl IsInFixedCalendar for TimeZoneInfo {} +impl InFixedCalendar for TimeZoneInfo {} diff --git a/components/datetime/src/scaffold/mod.rs b/components/datetime/src/scaffold/mod.rs index 5bd2e9b1a3e..8a233ac0c5c 100644 --- a/components/datetime/src/scaffold/mod.rs +++ b/components/datetime/src/scaffold/mod.rs @@ -18,8 +18,8 @@ pub use calendar::CalMarkers; pub use calendar::CldrCalendar; pub use calendar::ConvertCalendar; pub use calendar::FullDataCalMarkers; -pub use calendar::IsInCalendar; -pub use calendar::IsInFixedCalendar; +pub use calendar::InCalendar; +pub use calendar::InFixedCalendar; pub use calendar::NoDataCalMarkers; pub(crate) use fieldset_traits::datetime_marker_helper;