Skip to content

Commit

Permalink
Removing auto-derived Ord impl for Locale/LangId (#2142)
Browse files Browse the repository at this point in the history
  • Loading branch information
snktd authored Jul 15, 2022
1 parent 17a7494 commit 1a4233e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/locid/src/extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl ExtensionType {
}

/// A map of extensions associated with a given [`Locale`](crate::Locale).
#[derive(Debug, Default, PartialEq, Eq, Clone, Hash, PartialOrd, Ord)]
#[derive(Debug, Default, PartialEq, Eq, Clone, Hash)]
#[non_exhaustive]
pub struct Extensions {
/// A representation of the data for a Unicode extension, when present in the locale identifer.
Expand Down
2 changes: 1 addition & 1 deletion components/locid/src/extensions/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use litemap::LiteMap;
/// [`Unicode BCP47 T Extensions`]: https://unicode.org/reports/tr35/#t_Extension
/// [`RFC 6497`]: https://www.ietf.org/rfc/rfc6497.txt
/// [`Unicode Locale Identifier`]: https://unicode.org/reports/tr35/#Unicode_locale_identifier
#[derive(Clone, PartialEq, Eq, Debug, Default, Hash, PartialOrd, Ord)]
#[derive(Clone, PartialEq, Eq, Debug, Default, Hash)]
#[allow(clippy::exhaustive_structs)] // spec-backed stable datastructure
pub struct Transform {
/// The [`LanguageIdentifier`] specified with this locale extension, or `None` if not present.
Expand Down
2 changes: 1 addition & 1 deletion components/locid/src/langid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ use alloc::string::ToString;
/// ```
///
/// [`Unicode BCP47 Language Identifier`]: https://unicode.org/reports/tr35/tr35.html#Unicode_language_identifier
#[derive(Default, PartialEq, Eq, Clone, Hash, PartialOrd, Ord)]
#[derive(Default, PartialEq, Eq, Clone, Hash)]
#[allow(clippy::exhaustive_structs)] // This struct is stable (and invoked by a macro)
pub struct LanguageIdentifier {
/// Language subtag of the language identifier.
Expand Down
2 changes: 1 addition & 1 deletion components/locid/src/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use core::str::FromStr;
/// assert_eq!(loc.id.variants.get(0), "valencia".parse::<Variant>().ok().as_ref());
/// ```
/// [`Unicode Locale Identifier`]: https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier
#[derive(Default, PartialEq, Eq, Clone, Hash, PartialOrd, Ord)]
#[derive(Default, PartialEq, Eq, Clone, Hash)]
#[allow(clippy::exhaustive_structs)] // This struct is stable (and invoked by a macro)
pub struct Locale {
/// The basic language/script/region components in the locale identifier along with any variants.
Expand Down
2 changes: 1 addition & 1 deletion provider/core/src/data_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use icu_locid::LanguageIdentifier;
#[non_exhaustive]
pub struct DataRequestMetadata;

#[derive(Default, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Default, Debug, Clone, PartialEq, Eq)]
#[allow(clippy::exhaustive_structs)] // this type is stable
pub struct DataRequest {
pub options: ResourceOptions,
Expand Down
2 changes: 1 addition & 1 deletion provider/core/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ impl Writeable for ResourceKey {
/// A variant and language identifier, used for requesting data from a data provider.
///
/// The fields in a [`ResourceOptions`] are not generally known until runtime.
#[derive(PartialEq, Clone, Default, PartialOrd, Eq, Ord, Hash)]
#[derive(PartialEq, Clone, Default, Eq, Hash)]
pub struct ResourceOptions {
langid: LanguageIdentifier,
keywords: unicode_ext::Keywords,
Expand Down

0 comments on commit 1a4233e

Please sign in to comment.