From 09a4a788bc65424bbfe35edf1d0cbe312dfdd9b0 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 26 Mar 2026 08:23:46 -0700 Subject: [PATCH] Set explicit 1.84 MSRV, add MSRV CI --- .github/workflows/rust.yml | 13 +++++++++++++ Cargo.toml | 3 ++- README.md | 7 ++++--- src/grapheme.rs | 4 ++-- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e62d1a6..ce6105a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -36,6 +36,19 @@ jobs: - name: Verify regenerated tests run: ./scripts/unicode_gen_breaktests.py && diff testdata.rs tests/testdata/mod.rs + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.85.0 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + semver: name: semver runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index d122142..fd72569 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "unicode-segmentation" -version = "1.13.1" +version = "1.13.2" authors = ["kwantam ", "Manish Goregaokar "] edition = "2018" @@ -15,6 +15,7 @@ description = """ This crate provides Grapheme Cluster, Word and Sentence boundaries according to Unicode Standard Annex #29 rules. """ +rust-version = "1.85.0" include = [ "COPYRIGHT", diff --git a/README.md b/README.md index 6f35b3d..9432057 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,15 @@ unicode-segmentation = "1" # Change Log -## 1.13.1 +## 1.13.2 +* [#164](https://github.com/unicode-rs/unicode-segmentation/pull/164) Set explicit 1.85 MSRV * [#147](https://github.com/unicode-rs/unicode-segmentation/pull/147) Add ascii fast path for unicode_word_indices and unicode_words * [#157](https://github.com/unicode-rs/unicode-segmentation/pull/157) Support Unicode 17.0.0 -## 1.13.0 +## 1.13.0, 1.13.1 -Yanked due to accidental breakage. +Yanked due to accidental breakage and MSRV mistag. ## 1.12.0 diff --git a/src/grapheme.rs b/src/grapheme.rs index 3701bc5..50d53b3 100644 --- a/src/grapheme.rs +++ b/src/grapheme.rs @@ -517,14 +517,14 @@ impl GraphemeCursor { for ch in chunk.chars().rev() { if self.grapheme_category(ch) != gr::GC_Regional_Indicator { self.ris_count = Some(ris_count); - self.decide(ris_count.is_multiple_of(2)); + self.decide(ris_count % 2 == 0); return; } ris_count += 1; } self.ris_count = Some(ris_count); if chunk_start == 0 { - self.decide(ris_count.is_multiple_of(2)); + self.decide(ris_count % 2 == 0); } else { self.pre_context_offset = Some(chunk_start); self.state = GraphemeState::Regional;