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.
last
EscapeUnicode
1 parent 3dd88f6 commit 167b510Copy full SHA for 167b510
src/libcore/char.rs
@@ -471,6 +471,18 @@ impl Iterator for EscapeUnicode {
471
let n = n + self.hex_digit_idx;
472
(n, Some(n))
473
}
474
+
475
+ fn last(self) -> Option<char> {
476
+ match self.state {
477
+ EscapeUnicodeState::Done => None,
478
479
+ EscapeUnicodeState::RightBrace |
480
+ EscapeUnicodeState::Value |
481
+ EscapeUnicodeState::LeftBrace |
482
+ EscapeUnicodeState::Type |
483
+ EscapeUnicodeState::Backslash => Some('}'),
484
+ }
485
486
487
488
/// An iterator that yields the literal escape code of a `char`.
0 commit comments