Skip to content

Commit

Permalink
Merge pull request #103 from Marcondiro/master
Browse files Browse the repository at this point in the history
Update Unicode to version 16.0.0, bump to 0.1.24
  • Loading branch information
Manishearth authored Sep 17, 2024
2 parents 79687ca + 0a95cae commit c992130
Show file tree
Hide file tree
Showing 6 changed files with 12,527 additions and 6,054 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install msrv toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.36
override: true
uses: dtolnay/rust-toolchain@1.36.0
- name: Use tinyvec 1.6.0
run: cargo update -p tinyvec --precise 1.6.0
- name: Build
run: cargo build --verbose --all-features
regen:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "unicode-normalization"
version = "0.1.23"
version = "0.1.24"
authors = [
"kwantam <kwantam@gmail.com>",
"Manish Goregaokar <manishsmail@gmail.com>",
Expand Down
4 changes: 2 additions & 2 deletions scripts/unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import urllib.request
from itertools import batched

UNICODE_VERSION = "15.1.0"
UNICODE_VERSION = "16.0.0"
UCD_URL = "https://www.unicode.org/Public/%s/ucd/" % UNICODE_VERSION

PREAMBLE = """// Copyright 2012-2018 The Rust Project Developers. See the COPYRIGHT
Expand Down Expand Up @@ -388,7 +388,7 @@ def gen_composition_table(canon_comp, out):
out.write("pub(crate) fn composition_table_astral(c1: char, c2: char) -> Option<char> {\n")
out.write(" match (c1, c2) {\n")
for (c1, c2), c3 in sorted(canon_comp.items()):
if c1 >= 0x10000 and c2 >= 0x10000:
if c1 >= 0x10000 or c2 >= 0x10000:
out.write(" ('\\u{%s}', '\\u{%s}') => Some('\\u{%s}'),\n" % (hexify(c1), hexify(c2), hexify(c3)))

out.write(" _ => None,\n")
Expand Down
3 changes: 3 additions & 0 deletions src/quick_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ use crate::stream_safe;
use crate::tables;
use crate::UnicodeNormalization;

/// QuickCheck quickly determines if a string is normalized, it can return
/// `Maybe`
///
/// The QuickCheck algorithm can quickly determine if a text is or isn't
/// normalized without any allocations in many cases, but it has to be able to
/// return `Maybe` when a full decomposition and recomposition is necessary.
Expand Down
Loading

0 comments on commit c992130

Please sign in to comment.