Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back +?Sized on locid_transform custom constructors #3335

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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