We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ArrayVec
1 parent fea4f13 commit 485e9e7Copy full SHA for 485e9e7
src/replace.rs
@@ -8,7 +8,7 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
use core::fmt::{self, Write};
11
-use tinyvec::TinyVec;
+use tinyvec::ArrayVec;
12
13
/// External iterator for replacements for a string's characters.
14
#[derive(Clone)]
@@ -36,7 +36,7 @@ impl<I: Iterator<Item = char>> Iterator for Replacements<I> {
36
match self.iter.next() {
37
Some(ch) => {
38
// At this time, the longest replacement sequence has length 2.
39
- let mut buffer = TinyVec::<[char; 2]>::new();
+ let mut buffer = ArrayVec::<[char; 2]>::new();
40
super::char::decompose_cjk_compat_variants(ch, |d| buffer.push(d));
41
self.buffer = buffer.get(1).copied();
42
Some(buffer[0])
0 commit comments