We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd9f2a1 commit 82b2872Copy full SHA for 82b2872
components/locid/src/subtags/language.rs
@@ -44,7 +44,7 @@ pub struct Language(TinyAsciiStr<{ *LANGUAGE_LENGTH.end() }>);
44
const LANGUAGE_LENGTH: RangeInclusive<usize> = 2..=3;
45
// TODO(#348): Change this to invoke a const function.
46
// Safe because "und" is a valid language subtag
47
-const UND: Language = Language(unsafe { TinyAsciiStr::from_bytes_unchecked(*b"und") });
+const UND: Language = crate::language!("und");
48
49
impl Language {
50
/// A constructor which takes a utf8 slice, parses it and
0 commit comments