Skip to content

Commit

Permalink
Improve coverage a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Jun 12, 2024
1 parent b8221ab commit 134b659
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ipa-core/src/helpers/buffers/circular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ impl CircularBuf {
read_size % write_size == 0,
"\"{write_size}\" write size must divide read_size \"{read_size}\""
);
debug_assert!(
read_size <= capacity,
"read size \"{read_size}\" must be less than or equal to capacity \"{capacity}\""
);
Self {
write: 0,
read: 0,
Expand Down Expand Up @@ -537,7 +533,9 @@ mod test {
output.extend(Six::read_once(&mut buf).into_iter().map(usize::from));
buf.next().write(&TwoBytes::from(&6));
buf.next().write(&TwoBytes::from(&7));
assert!(!buf.is_closed());
buf.close();
assert!(buf.is_closed());

output.extend(Six::read_once(&mut buf).into_iter().map(usize::from));

Expand Down Expand Up @@ -776,7 +774,6 @@ mod test {
}

fn read_write(setup: BufSetup, ops: u32, seed: u64) {
println!("{setup:?}, {ops}, {seed}");
let mut buf = CircularBuf::from(setup);
let mut cnt = Wrapping::<u8>::default();
let mut written = Vec::new();
Expand Down

0 comments on commit 134b659

Please sign in to comment.