Skip to content

Commit

Permalink
fix tests on rust 1.50
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindln committed Feb 3, 2024
1 parent f64f3da commit 79307d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions miniz_oxide/src/inflate/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ mod test {
let mut b_buf = [0; LEN];

// This should fail with the out buffer being to small.
let b_status = tinfl_decompress_oxide(&mut b, &encoded[..], b_buf.as_mut_slice(), flags);
let b_status = tinfl_decompress_oxide(&mut b, &encoded[..], &mut b_buf, flags);

assert_eq!(b_status.0, TINFLStatus::Failed);

Expand All @@ -1838,7 +1838,7 @@ mod test {
b = DecompressorOxide::new();

// With TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF set this should no longer fail.
let b_status = tinfl_decompress_oxide(&mut b, &encoded[..], b_buf.as_mut_slice(), flags);
let b_status = tinfl_decompress_oxide(&mut b, &encoded[..], &mut b_buf, flags);

assert_eq!(b_buf[..b_status.2], b"Hello, zlib!"[..]);
assert_eq!(b_status.0, TINFLStatus::Done);
Expand Down Expand Up @@ -1871,7 +1871,7 @@ mod test {

let mut b_buf = [0; LEN];

let b_status = tinfl_decompress_oxide(&mut b, &encoded[..], b_buf.as_mut_slice(), flags);
let b_status = tinfl_decompress_oxide(&mut b, &encoded[..], &mut b_buf, flags);
assert_eq!(b_buf[..b_status.2], text[..]);
assert_eq!(b_status.0, TINFLStatus::Done);
}
Expand Down

0 comments on commit 79307d7

Please sign in to comment.