fix: resolve mutability-related warning

This commit is contained in:
Miwa / Ensan
2024-12-01 12:04:27 +09:00
parent 63ade4d6e9
commit 4ab9bb94d4

View File

@@ -130,7 +130,7 @@ extension ComposingText {
}
return nil
}
while var (convertTargetElements, lastElement, count) = stack.popLast() {
while case .some((var convertTargetElements, let lastElement, let count)) = stack.popLast() {
if rightIndexRange.contains(count + left - 1) {
if let convertTarget = ComposingText.getConvertTargetIfRightSideIsValid(lastElement: lastElement, of: self.input, to: count + left, convertTargetElements: convertTargetElements)?.map({$0.toKatakana()}) {
stringToInfo.append((convertTarget, (count + left - 1)))