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:
commit
15e8b903b2
@ -2105,7 +2105,7 @@ fn remove_bom(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
|
|||||||
|
|
||||||
/// Replaces `\r\n` with `\n` in-place in `src`.
|
/// 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>) {
|
fn normalize_newlines(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
|
||||||
if !src.as_bytes().contains(&b'\r') {
|
if !src.as_bytes().contains(&b'\r') {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user