Skip to content

Commit

Permalink
Make the unicode blocks ordered, to iterate in correct order
Browse files Browse the repository at this point in the history
This makes --print-unicode-blocks list all blocks in the expected order
instead of a random order
  • Loading branch information
faern committed Nov 29, 2024
1 parent 0113b37 commit 53c0b8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unicode_blocks.rs
Original file line number Diff line number Diff line change
@@ -328,7 +328,7 @@ pub const SUPPLEMENTARY_PRIVATE_USE_AREA_A: std::ops::RangeInclusive<char> = '\u
pub const SUPPLEMENTARY_PRIVATE_USE_AREA_B: std::ops::RangeInclusive<char> = '\u{100000}'..='\u{10FFFF}';

/// UNICODE_BLOCKS is a mapping from the pretty block name to the character range.
pub static UNICODE_BLOCKS: phf::Map<&'static str, std::ops::RangeInclusive<char>> = phf::phf_map! {
pub static UNICODE_BLOCKS: phf::OrderedMap<&'static str, std::ops::RangeInclusive<char>> = phf::phf_ordered_map! {
"Basic Latin" => BASIC_LATIN,
"Latin-1 Supplement" => LATIN_1_SUPPLEMENT,
"Latin Extended-A" => LATIN_EXTENDED_A,

0 comments on commit 53c0b8e

Please sign in to comment.