Rollup merge of #120453 - mattheww:2024-01_normalize_newlines, r=oli-obk

Fix incorrect comment in normalize_newlines

The incorrect comment seems to be left over from sometime before this function was first merged.
This commit is contained in:
Dylan DPC 2024-01-29 12:56:54 +00:00 committed by GitHub
commit 15e8b903b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -2105,7 +2105,7 @@ fn remove_bom(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
/// Replaces `\r\n` with `\n` in-place in `src`.
///
/// Returns error if there's a lone `\r` in the string.
/// Leaves any occurrences of lone `\r` unchanged.
fn normalize_newlines(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
if !src.as_bytes().contains(&b'\r') {
return;