Skip to content

Commit c9ee183

Browse files
committed
Swap the methods some tests are using
Bytes-backed slices need to use _into() as the data may need to be decoded.
1 parent 60e334f commit c9ee183

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn test_issue94() {
100100
let mut reader = Reader::from_reader(&data[..]);
101101
reader.trim_text(true);
102102
loop {
103-
match reader.read_event() {
103+
match reader.read_event_into(&mut Vec::new()) {
104104
Ok(Eof) | Err(..) => break,
105105
_ => (),
106106
}

tests/xmlrs_reader_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ fn test_bytes(input: &[u8], output: &[u8], trim: bool) {
373373

374374
let mut decoder = reader.decoder();
375375
loop {
376-
let line = match reader.read_resolved_event() {
376+
let line = match reader.read_resolved_event_into(&mut Vec::new()) {
377377
Ok((_, Event::Decl(e))) => {
378378
// Declaration could change decoder
379379
decoder = reader.decoder();

0 commit comments

Comments
 (0)