Skip to content

Commit

Permalink
Add back +?Sized on locid_transform custom constructors (#3335)
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Apr 17, 2023
1 parent fbed6df commit 35c9952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/locid_transform/src/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl LocaleCanonicalizer {
// Note: This is a custom impl because the bounds on LocaleExpander::try_new_unstable changed
#[doc = icu_provider::gen_any_buffer_docs!(ANY, icu_provider, Self::try_new_unstable)]
pub fn try_new_with_any_provider(
provider: &impl AnyProvider,
provider: &(impl AnyProvider + ?Sized),
) -> Result<LocaleCanonicalizer, LocaleTransformError> {
let expander = LocaleExpander::try_new_with_any_provider(provider)?;
Self::try_new_with_expander_unstable(&provider.as_downcasting(), expander)
Expand All @@ -237,7 +237,7 @@ impl LocaleCanonicalizer {
#[doc = icu_provider::gen_any_buffer_docs!(BUFFER, icu_provider, Self::try_new_unstable)]
#[cfg(feature = "serde")]
pub fn try_new_with_buffer_provider(
provider: &impl BufferProvider,
provider: &(impl BufferProvider + ?Sized),
) -> Result<LocaleCanonicalizer, LocaleTransformError> {
let expander = LocaleExpander::try_new_with_buffer_provider(provider)?;
Self::try_new_with_expander_unstable(&provider.as_deserializing(), expander)
Expand Down
4 changes: 2 additions & 2 deletions components/locid_transform/src/expander.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,15 @@ impl LocaleExpander {

#[doc = icu_provider::gen_any_buffer_docs!(ANY, icu_provider, Self::try_new_unstable)]
pub fn try_new_with_any_provider(
provider: &impl AnyProvider,
provider: &(impl AnyProvider + ?Sized),
) -> Result<LocaleExpander, LocaleTransformError> {
Self::try_new_compat(&provider.as_downcasting())
}

#[doc = icu_provider::gen_any_buffer_docs!(BUFFER, icu_provider, Self::try_new_unstable)]
#[cfg(feature = "serde")]
pub fn try_new_with_buffer_provider(
provider: &impl BufferProvider,
provider: &(impl BufferProvider + ?Sized),
) -> Result<LocaleExpander, LocaleTransformError> {
Self::try_new_compat(&provider.as_deserializing())
}
Expand Down

0 comments on commit 35c9952

Please sign in to comment.