File: cpass.rs

package info (click to toggle)
rust-heapless 0.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 572 kB
  • sloc: makefile: 2
file content (25 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Collections of `Send`-able things are `Send`

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

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

    unsafe impl Send for IsSend {}

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

    is_send::<Consumer<IsSend, 4>>();
    is_send::<Producer<IsSend, 4>>();
    is_send::<Queue<IsSend, 4>>();
    is_send::<Vec<IsSend, 4>>();
    is_send::<HistoryBuffer<IsSend, 4>>();
}