Improve comments.
Remove a low-value comment, remove a duplicate comment, and correct a third comment.
This commit is contained in:
parent
7dbf2c0ed8
commit
a21c045897
1 changed files with 1 additions and 4 deletions
|
@ -84,12 +84,9 @@ where
|
|||
Mode::Char | Mode::Byte => {
|
||||
let mut chars = src.chars();
|
||||
let result = unescape_char_or_byte(&mut chars, mode == Mode::Byte);
|
||||
// The Chars iterator moved forward.
|
||||
callback(0..(src.len() - chars.as_str().len()), result);
|
||||
}
|
||||
Mode::Str | Mode::ByteStr => unescape_str_or_byte_str(src, mode == Mode::ByteStr, callback),
|
||||
// NOTE: Raw strings do not perform any explicit character escaping, here we
|
||||
// only translate CRLF to LF and produce errors on bare CR.
|
||||
Mode::RawStr | Mode::RawByteStr => {
|
||||
unescape_raw_str_or_raw_byte_str(src, mode == Mode::RawByteStr, callback)
|
||||
}
|
||||
|
@ -333,7 +330,7 @@ where
|
|||
/// Takes a contents of a string literal (without quotes) and produces a
|
||||
/// sequence of characters or errors.
|
||||
/// NOTE: Raw strings do not perform any explicit character escaping, here we
|
||||
/// only translate CRLF to LF and produce errors on bare CR.
|
||||
/// only produce errors on bare CR.
|
||||
fn unescape_raw_str_or_raw_byte_str<F>(src: &str, is_byte: bool, callback: &mut F)
|
||||
where
|
||||
F: FnMut(Range<usize>, Result<char, EscapeError>),
|
||||
|
|
Loading…
Add table
Reference in a new issue