Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6884202

Browse files
committed
Made local variable immutable by moving it into loop
1 parent3b75ee1 commit6884202

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/word.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,13 @@ impl<'a> Iterator for UWordBounds<'a> {
172172
letmut cat = wd::WC_Any;
173173
letmut savecat = wd::WC_Any;
174174

175-
// Whether or not the previous category was ZWJ
176-
// ZWJs get collapsed, so this handles precedence of WB3c over WB4
177-
letmut prev_zwj;
178175
// If extend/format/zwj were skipped. Handles precedence of WB3d over WB4
179176
letmut skipped_format_extend =false;
180177
for(curr, ch)inself.string.char_indices(){
181178
idx = curr;
182-
prev_zwj = cat == wd::WC_ZWJ;
179+
// Whether or not the previous category was ZWJ
180+
// ZWJs get collapsed, so this handles precedence of WB3c over WB4
181+
let prev_zwj = cat == wd::WC_ZWJ;
183182
// if there's a category cached, grab it
184183
cat =matchself.cat{
185184
None => wd::word_category(ch).2,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp