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.
unwrap
1 parent 74dddd6 commit 4d76b96Copy full SHA for 4d76b96
src/recompose.rs
@@ -63,15 +63,16 @@ impl<I: Iterator<Item=char>> Iterator for Recompositions<I> {
63
Composing => {
64
for ch in self.iter.by_ref() {
65
let ch_class = super::char::canonical_combining_class(ch);
66
- if self.composee.is_none() {
67
- if ch_class != 0 {
68
- return Some(ch);
69
- }
70
- self.composee = Some(ch);
71
- continue;
72
73
- let k = self.composee.clone().unwrap();
74
-
+ let k = match self.composee {
+ None => {
+ if ch_class != 0 {
+ return Some(ch);
+ }
+ self.composee = Some(ch);
+ continue;
+ },
+ Some(k) => k,
75
+ };
76
match self.last_ccc {
77
None => {
78
match super::char::compose(k, ch) {
0 commit comments