Commit a4d3b58
🤖 [displaynames] Refactor fallback implementation to reduce diff size and improve Rustiness
- Reuse ScriptDisplayNameOwned, RegionDisplayNameOwned, and VariantDisplayNameOwned constructors in try_new_unstable to eliminate duplicate loading boilerplate.
- Replace PayloadOrFallback enum with a type alias to DataPayloadOr<M, TinyAsciiStr<8>>, reusing robust existing implementations and eliminating custom Debug impl.
- Use precise DataPayloadOr<LocaleNamesLanguageMediumV1, TinyAsciiStr<4>> for language_payload, avoiding unreachable Absent case.
- Implement elegant Rusty iterator chain for variant loading.
- Restore all original comments in language.rs.
- Preserve original test_concatenate structure in tests.rs, running both strict and lenient checks in the same loop, and adding test_fallback_parts.
Co-authored-by: Gemini <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 4898099 commit a4d3b58
4 files changed
Lines changed: 303 additions & 70 deletions
File tree
- components/experimental
- src/displaynames/single
- tests/displaynames
Lines changed: 48 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments