Skip to content

Commit

Permalink
Make some traits pub(crate) if they are able to be made pub(crate)
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Nov 21, 2023
1 parent 1c0b95e commit bed0ef8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/calendar/src/calendar_arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use tinystr::tinystr;
// Note: The Ord/PartialOrd impls can be derived because the fields are in the correct order.
#[derive(Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
#[allow(clippy::exhaustive_structs)] // this type is stable
pub struct ArithmeticDate<C> {
pub(crate) struct ArithmeticDate<C> {
pub year: i32,
/// 1-based month of year
pub month: u8,
Expand All @@ -30,7 +30,7 @@ impl<C> Clone for ArithmeticDate<C> {
#[allow(dead_code)] // TODO: Remove dead code tag after use
pub(crate) const MAX_ITERS_FOR_DAYS_OF_MONTH: u8 = 33;

pub trait CalendarArithmetic: Calendar {
pub(crate) trait CalendarArithmetic: Calendar {
fn month_days(year: i32, month: u8) -> u8;
fn months_for_every_year(year: i32) -> u8;
fn is_leap_year(year: i32) -> bool;
Expand Down
2 changes: 1 addition & 1 deletion components/datetime/src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use icu_provider::prelude::*;
use writeable::Writeable;

use crate::{
calendar, input::DateInput, input::DateTimeInput, input::IsoTimeInput, CldrCalendar,
calendar, calendar::CldrCalendar, input::DateInput, input::DateTimeInput, input::IsoTimeInput,
DateTimeError, FormattedDateTime,
};

Expand Down
3 changes: 2 additions & 1 deletion components/datetime/src/zoned_datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use writeable::Writeable;

use crate::{
calendar,
calendar::CldrCalendar,
format::zoned_datetime::FormattedZonedDateTime,
input::{DateTimeInput, TimeZoneInput},
options::DateTimeFormatterOptions,
Expand All @@ -22,7 +23,7 @@ use crate::{
},
raw,
time_zone::TimeZoneFormatterOptions,
CldrCalendar, DateTimeError,
DateTimeError,
};

/// The composition of [`TypedDateTimeFormatter`](crate::TypedDateTimeFormatter) and [`TimeZoneFormatter`].
Expand Down
2 changes: 1 addition & 1 deletion experimental/zerotrie/src/builder/nonconst/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use alloc::collections::VecDeque;
use alloc::vec::Vec;

/// A trait applied to a data structure for building a ZeroTrie.
pub trait TrieBuilderStore {
pub(crate) trait TrieBuilderStore {
/// Create a new empty store.
fn atbs_new_empty() -> Self;

Expand Down

0 comments on commit bed0ef8

Please sign in to comment.