diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /vendor/icu_locid/src/subtags/language.rs | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-5cd5bd4daf55da04d2c8e7c06c3067a027cfbfc2.tar.xz rustc-5cd5bd4daf55da04d2c8e7c06c3067a027cfbfc2.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | vendor/icu_locid/src/subtags/language.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vendor/icu_locid/src/subtags/language.rs b/vendor/icu_locid/src/subtags/language.rs index a5ec8d76e..86b51b93a 100644 --- a/vendor/icu_locid/src/subtags/language.rs +++ b/vendor/icu_locid/src/subtags/language.rs @@ -55,7 +55,6 @@ impl Language { /// use icu::locid::subtags::Language; /// /// assert_eq!(Language::default(), Language::UND); - /// assert_eq!("und", Language::UND.to_string()); /// ``` pub const UND: Self = unsafe { Self::from_raw_unchecked(*b"und") }; @@ -64,15 +63,15 @@ impl Language { /// # Examples /// /// ``` - /// use icu::locid::subtags::Language; + /// use icu::locid::{subtags::Language, subtags_language as language}; /// - /// let mut lang: Language = "csb".parse().expect("Parsing failed."); + /// let mut lang = language!("csb"); /// - /// assert_eq!(lang.as_str(), "csb"); + /// assert_ne!(lang, Language::UND); /// /// lang.clear(); /// - /// assert_eq!(lang.as_str(), "und"); + /// assert_eq!(lang, Language::UND); /// ``` #[inline] pub fn clear(&mut self) { @@ -86,7 +85,7 @@ impl Language { /// ``` /// use icu::locid::subtags::Language; /// - /// let mut lang: Language = "und".parse().expect("Parsing failed."); + /// let mut lang = Language::UND; /// /// assert!(lang.is_empty()); /// |