Skip to content

Commit 1c1c7f1

Browse files
committed
vscode failed to merge...
1 parent 697ef30 commit 1c1c7f1

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tests/system.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ use std::fs;
1919
use std::io::{self, BufRead, BufReader, Read};
2020
use std::iter::Peekable;
2121
use std::path::{Path, PathBuf};
22-
<<<<<<< HEAD
2322
use std::str::Chars;
24-
=======
25-
use std::str::Bytes;
26-
>>>>>>> c41b45169a6a8b461d6615fb59ade61182daf5f5
2723

2824
use rustfmt::*;
2925
use rustfmt::filemap::{write_system_newlines, FileMap};
@@ -440,7 +436,6 @@ fn rustfmt_diff_no_diff_test() {
440436

441437
// Compare strings without distinguishing between CRLF and LF
442438
fn string_eq_ignore_newline_repr(left: &str, right: &str) -> bool {
443-
<<<<<<< HEAD
444439
let left = CharsIgnoreNewlineRepr(left.chars().peekable());
445440
let right = CharsIgnoreNewlineRepr(right.chars().peekable());
446441
left.eq(right)
@@ -457,24 +452,6 @@ impl<'a> Iterator for CharsIgnoreNewlineRepr<'a> {
457452
'\n'
458453
} else {
459454
'\r'
460-
=======
461-
let left = BytesIgnoreNewlineRepr(left.bytes().peekable());
462-
let right = BytesIgnoreNewlineRepr(right.bytes().peekable());
463-
left.eq(right)
464-
}
465-
466-
struct BytesIgnoreNewlineRepr<'a>(Peekable<Bytes<'a>>);
467-
468-
impl<'a> Iterator for BytesIgnoreNewlineRepr<'a> {
469-
type Item = u8;
470-
fn next(&mut self) -> Option<u8> {
471-
self.0.next().map(|c| if c == b'\r' {
472-
if *self.0.peek().unwrap_or(&0) == b'\n' {
473-
self.0.next();
474-
b'\n'
475-
} else {
476-
b'\r'
477-
>>>>>>> c41b45169a6a8b461d6615fb59ade61182daf5f5
478455
}
479456
} else {
480457
c
@@ -484,14 +461,10 @@ impl<'a> Iterator for BytesIgnoreNewlineRepr<'a> {
484461

485462
#[test]
486463
fn string_eq_ignore_newline_repr_test() {
487-
<<<<<<< HEAD
488464
assert!(string_eq_ignore_newline_repr("", ""));
489465
assert!(!string_eq_ignore_newline_repr("", "abc"));
490466
assert!(!string_eq_ignore_newline_repr("abc", ""));
491467
assert!(string_eq_ignore_newline_repr("a\nb\nc\rd", "a\nb\r\nc\rd"));
492468
assert!(string_eq_ignore_newline_repr("a\r\n\r\n\r\nb", "a\n\n\nb"));
493469
assert!(!string_eq_ignore_newline_repr("a\r\nbcd", "a\nbcdefghijk"));
494-
=======
495-
assert!(string_eq_ignore_newline_repr("a\nb\nc\rd", "a\nb\r\nc\rd"));
496-
>>>>>>> c41b45169a6a8b461d6615fb59ade61182daf5f5
497470
}

0 commit comments

Comments
 (0)