[go: up one dir, main page]

heapless 0.5.3

`static` friendly data structures that don't require dynamic memory allocation
Documentation
//! Collections of `Send`-able things are `Send`

use heapless::{
    consts,
    spsc::{Consumer, Producer, Queue},
    Vec,
};

#[test]
fn send() {
    struct IsSend;

    unsafe impl Send for IsSend {}

    fn is_send<T>()
    where
        T: Send,
    {
    }

    is_send::<Consumer<IsSend, consts::U4>>();
    is_send::<Producer<IsSend, consts::U4>>();
    is_send::<Queue<IsSend, consts::U4>>();
    is_send::<Vec<IsSend, consts::U4>>();
}