From 915de3afee9ddca034f21143215c68b0cc582cdc Mon Sep 17 00:00:00 2001 From: Windel Bouwman Date: Sun, 7 Jul 2019 20:18:03 +0200 Subject: [PATCH 1/6] Expand manifest with crates.io information. --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 637df98..e11029f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "unicode-casing" version = "0.1.0" +description = "Titlecase helper function on characters." +repository = "https://github.com/RustPython/unicode-casing" +license = "MIT" authors = ["Joey Hain "] edition = "2018" From 0468fccfb35fe6703444333ef9f6df5d4b1f8d6d Mon Sep 17 00:00:00 2001 From: Masterchef365 Date: Sun, 31 Aug 2025 00:07:01 -0700 Subject: [PATCH 2/6] Add no_std support --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index a59e7c0..b9252b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +#![no_std] +extern crate alloc; + mod bool_trie; mod tables; From 0ddc7fe780e3430724f946de2a8b97e01ad424fd Mon Sep 17 00:00:00 2001 From: "Jeong, YunWon" <69878+youknowone@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:27:01 +0900 Subject: [PATCH 3/6] Add GitHub Actions workflow for Rust project --- .github/workflows/rust.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..000bb2c --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,22 @@ +name: Rust + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From c4fa650791c1629010298b8bcbc50c848a666831 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 2 Sep 2025 12:25:39 +0900 Subject: [PATCH 4/6] 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 997e0dfe588dcc664f60bb22aa65d71b1728b144 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 2 Sep 2025 12:25:44 +0900 Subject: [PATCH 5/6] 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 8b1930b0b7cf874151482a0ab23bf4a4ab0f773d Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 2 Sep 2025 12:26:29 +0900 Subject: [PATCH 6/6] 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"