diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/icu_locid/src/parser | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/icu_locid/src/parser')
-rw-r--r-- | vendor/icu_locid/src/parser/langid.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/icu_locid/src/parser/langid.rs b/vendor/icu_locid/src/parser/langid.rs index 653ca7e6e..2c6ddeb03 100644 --- a/vendor/icu_locid/src/parser/langid.rs +++ b/vendor/icu_locid/src/parser/langid.rs @@ -5,10 +5,10 @@ pub use super::errors::ParserError; use crate::extensions::unicode::{Attribute, Key, Value}; use crate::extensions::ExtensionType; +use crate::helpers::ShortSlice; use crate::parser::SubtagIterator; use crate::LanguageIdentifier; use crate::{extensions, subtags}; -use alloc::vec::Vec; use tinystr::TinyAsciiStr; #[derive(PartialEq, Clone, Copy)] @@ -31,7 +31,7 @@ pub fn parse_language_identifier_from_iter( ) -> Result<LanguageIdentifier, ParserError> { let mut script = None; let mut region = None; - let mut variants = Vec::new(); + let mut variants = ShortSlice::new(); let language = if let Some(subtag) = iter.next() { subtags::Language::try_from_bytes(subtag)? @@ -95,7 +95,7 @@ pub fn parse_language_identifier_from_iter( language, script, region, - variants: subtags::Variants::from_vec_unchecked(variants), + variants: subtags::Variants::from_short_slice_unchecked(variants), }) } |