|
84 | 84 | Mode::Char | Mode::Byte => {
|
85 | 85 | let mut chars = src.chars();
|
86 | 86 | let result = unescape_char_or_byte(&mut chars, mode == Mode::Byte);
|
87 |
| - // The Chars iterator moved forward. |
88 | 87 | callback(0..(src.len() - chars.as_str().len()), result);
|
89 | 88 | }
|
90 | 89 | Mode::Str | Mode::ByteStr => unescape_str_or_byte_str(src, mode == Mode::ByteStr, callback),
|
91 |
| - // NOTE: Raw strings do not perform any explicit character escaping, here we |
92 |
| - // only translate CRLF to LF and produce errors on bare CR. |
93 | 90 | Mode::RawStr | Mode::RawByteStr => {
|
94 | 91 | unescape_raw_str_or_raw_byte_str(src, mode == Mode::RawByteStr, callback)
|
95 | 92 | }
|
@@ -333,7 +330,7 @@ where
|
333 | 330 | /// Takes a contents of a string literal (without quotes) and produces a
|
334 | 331 | /// sequence of characters or errors.
|
335 | 332 | /// NOTE: Raw strings do not perform any explicit character escaping, here we
|
336 |
| -/// only translate CRLF to LF and produce errors on bare CR. |
| 333 | +/// only produce errors on bare CR. |
337 | 334 | fn unescape_raw_str_or_raw_byte_str<F>(src: &str, is_byte: bool, callback: &mut F)
|
338 | 335 | where
|
339 | 336 | F: FnMut(Range<usize>, Result<char, EscapeError>),
|
|
0 commit comments