diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-05-02 09:51:38 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-05-02 09:51:38 +0200 |
| commit | da139693f6375415567725b949c26ddb0367b73c (patch) | |
| tree | 904f1c779814e9d4f0fa9f4d7c64ed1e1d463523 /src | |
| parent | e52fb6c96b96fdaba14f31ca583baebdec14366b (diff) | |
| download | rust-da139693f6375415567725b949c26ddb0367b73c.tar.gz rust-da139693f6375415567725b949c26ddb0367b73c.zip | |
fix existing bug when the first write was always included in full
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/compiletest/src/read2.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/read2.rs b/src/tools/compiletest/src/read2.rs index 19c11a1e6b8..bd5f3593b65 100644 --- a/src/tools/compiletest/src/read2.rs +++ b/src/tools/compiletest/src/read2.rs @@ -74,7 +74,8 @@ impl ProcOutput { } let mut head = replace(bytes, Vec::new()); - let tail = head.split_off(new_len - TAIL_LEN).into_boxed_slice(); + let mut middle = head.split_off(HEAD_LEN); + let tail = middle.split_off(middle.len() - TAIL_LEN).into_boxed_slice(); let skipped = new_len - HEAD_LEN - TAIL_LEN; ProcOutput::Abbreviated { head, skipped, tail } } |
