hal-internal: fix failing test due to not initializing ringbuf.

This commit is contained in:
Dario Nieuwenhuis 2024-05-12 23:40:32 +02:00
parent f30b298b0e
commit 43d51884e2

View File

@ -478,8 +478,12 @@ mod tests {
#[test] #[test]
fn zero_len() { fn zero_len() {
let mut b = [0; 0];
let rb = RingBuffer::new(); let rb = RingBuffer::new();
unsafe { unsafe {
rb.init(b.as_mut_ptr(), b.len());
assert_eq!(rb.is_empty(), true); assert_eq!(rb.is_empty(), true);
assert_eq!(rb.is_full(), true); assert_eq!(rb.is_full(), true);