From 6884202f3a1c855cf98628e23919384926bc56a3 Mon Sep 17 00:00:00 2001 From: Yoh Deadfall Date: Sun, 21 Mar 2021 16:02:06 +0100 Subject: [PATCH] Made local variable immutable by moving it into loop --- src/word.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/word.rs b/src/word.rs index 179d122..79abf87 100644 --- a/src/word.rs +++ b/src/word.rs @@ -172,14 +172,13 @@ impl<'a> Iterator for UWordBounds<'a> { let mut cat = wd::WC_Any; let mut savecat = wd::WC_Any; - // Whether or not the previous category was ZWJ - // ZWJs get collapsed, so this handles precedence of WB3c over WB4 - let mut prev_zwj; // If extend/format/zwj were skipped. Handles precedence of WB3d over WB4 let mut skipped_format_extend = false; for (curr, ch) in self.string.char_indices() { idx = curr; - prev_zwj = cat == wd::WC_ZWJ; + // Whether or not the previous category was ZWJ + // ZWJs get collapsed, so this handles precedence of WB3c over WB4 + let prev_zwj = cat == wd::WC_ZWJ; // if there's a category cached, grab it cat = match self.cat { None => wd::word_category(ch).2, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy