Skip to content

Commit d446fa8

Browse files
authored
Set explicit 1.84 MSRV, add MSRV CI (#164)
1 parent cb4972b commit d446fa8

4 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/rust.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ jobs:
3636
- name: Verify regenerated tests
3737
run: ./scripts/unicode_gen_breaktests.py && diff testdata.rs tests/testdata/mod.rs
3838

39+
msrv:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Install Rust
44+
uses: dtolnay/rust-toolchain@master
45+
with:
46+
toolchain: 1.85.0
47+
- name: Build
48+
run: cargo build --verbose
49+
- name: Run tests
50+
run: cargo test --verbose
51+
3952
semver:
4053
name: semver
4154
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "unicode-segmentation"
4-
version = "1.13.1"
4+
version = "1.13.2"
55
authors = ["kwantam <kwantam@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>"]
66

77
edition = "2018"
@@ -15,6 +15,7 @@ description = """
1515
This crate provides Grapheme Cluster, Word and Sentence boundaries
1616
according to Unicode Standard Annex #29 rules.
1717
"""
18+
rust-version = "1.85.0"
1819

1920
include = [
2021
"COPYRIGHT",

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ unicode-segmentation = "1"
4343

4444
# Change Log
4545

46-
## 1.13.1
46+
## 1.13.2
4747

48+
* [#164](https://github.com/unicode-rs/unicode-segmentation/pull/164) Set explicit 1.85 MSRV
4849
* [#147](https://github.com/unicode-rs/unicode-segmentation/pull/147) Add ascii fast path for unicode_word_indices and unicode_words
4950
* [#157](https://github.com/unicode-rs/unicode-segmentation/pull/157) Support Unicode 17.0.0
5051

51-
## 1.13.0
52+
## 1.13.0, 1.13.1
5253

53-
Yanked due to accidental breakage.
54+
Yanked due to accidental breakage and MSRV mistag.
5455

5556
## 1.12.0
5657

src/grapheme.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,14 @@ impl GraphemeCursor {
517517
for ch in chunk.chars().rev() {
518518
if self.grapheme_category(ch) != gr::GC_Regional_Indicator {
519519
self.ris_count = Some(ris_count);
520-
self.decide(ris_count.is_multiple_of(2));
520+
self.decide(ris_count % 2 == 0);
521521
return;
522522
}
523523
ris_count += 1;
524524
}
525525
self.ris_count = Some(ris_count);
526526
if chunk_start == 0 {
527-
self.decide(ris_count.is_multiple_of(2));
527+
self.decide(ris_count % 2 == 0);
528528
} else {
529529
self.pre_context_offset = Some(chunk_start);
530530
self.state = GraphemeState::Regional;

0 commit comments

Comments
 (0)