Skip to content

Commit da13969

Browse files
committed
fix existing bug when the first write was always included in full
1 parent e52fb6c commit da13969

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/compiletest/src/read2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ impl ProcOutput {
7474
}
7575

7676
let mut head = replace(bytes, Vec::new());
77-
let tail = head.split_off(new_len - TAIL_LEN).into_boxed_slice();
77+
let mut middle = head.split_off(HEAD_LEN);
78+
let tail = middle.split_off(middle.len() - TAIL_LEN).into_boxed_slice();
7879
let skipped = new_len - HEAD_LEN - TAIL_LEN;
7980
ProcOutput::Abbreviated { head, skipped, tail }
8081
}

0 commit comments

Comments
 (0)