From 4d1697a15f464930bf962f767f51103362f4134b Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 2 Sep 2025 12:25:39 +0900 Subject: [PATCH 1/3] Fix test --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index b9252b9..0dfa1ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -100,6 +100,7 @@ impl Iterator for ToTitlecase { #[cfg(test)] mod tests { use super::*; + use alloc::vec::Vec; #[test] fn test_is_titlecase() { From ef9a22ac51a14c2a7894ea0c4b9a308f883c6455 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 2 Sep 2025 12:25:44 +0900 Subject: [PATCH 2/3] Run rustfmt --- src/tables.rs | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/tables.rs b/src/tables.rs index cc1f2de..ed56e0d 100644 --- a/src/tables.rs +++ b/src/tables.rs @@ -60,11 +60,9 @@ pub mod general_category { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 - ], - r3: &[ - 0x0000000000000000, 0x1000ff00ff00ff00, 0x1000000000001000 + 0, 0, 0, 0, 0, 0, ], + r3: &[0x0000000000000000, 0x1000ff00ff00ff00, 0x1000000000001000], r4: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -74,32 +72,28 @@ pub mod general_category { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], r5: &[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 - ], - r6: &[ - 0x0000000000000000 + 0, 0, 0, 0, 0, 0, ], + r6: &[0x0000000000000000], }; pub fn Lt(c: char) -> bool { Lt_table.lookup(c) } - } -pub mod derived_property { -} +pub mod derived_property {} pub mod conversions { pub fn to_title(c: char) -> [char; 3] { match bsearch_case_table(c, to_titlecase_table) { - None => [c, '\0', '\0'], - Some(index) => to_titlecase_table[index].1 + None => [c, '\0', '\0'], + Some(index) => to_titlecase_table[index].1, } } @@ -764,6 +758,4 @@ pub mod conversions { ('\u{1e941}', ['\u{1e91f}', '\0', '\0']), ('\u{1e942}', ['\u{1e920}', '\0', '\0']), ('\u{1e943}', ['\u{1e921}', '\0', '\0']) ]; - } - From 8da99eaa9c69741c0f7bc597960e0c1811336631 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 2 Sep 2025 12:26:29 +0900 Subject: [PATCH 3/3] Mark 0.1.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e11029f..1df9bc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "unicode-casing" -version = "0.1.0" +version = "0.1.1" description = "Titlecase helper function on characters." repository = "https://github.com/RustPython/unicode-casing" license = "MIT"