kana_transliteration: avoid some unnecessary tring allocations for hw/fw katakana trans
Build and test / build-dynamic-library (push) Failing after 43s
Build and test / check (push) Successful in 47s
Build and test / build-static-library (push) Failing after 47s
Build and test / test (push) Failing after 1m48s

This commit is contained in:
2026-06-04 18:57:17 +09:00
parent b8ab2ad2fc
commit ba75bc203d
+2 -2
View File
@@ -384,7 +384,7 @@ pub fn transliterate_halfwidth_katakana_to_fullwidth_katakana(halfwidth: &str) -
'ン' => &['ン'],
_ => &[c],
};
result.push_str(out.iter().collect::<String>().as_str());
result.extend(out.iter().copied());
}
result
@@ -478,7 +478,7 @@ pub fn transliterate_fullwidth_katakana_to_halfwidth_katakana(fullwidth: &str) -
_ => &[c],
};
result.push_str(out.iter().collect::<String>().as_str());
result.extend(out.iter().copied());
}
result