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
26
27
28
29
30
31
32
33
34
35
mod suite;
mod context;
mod example;
pub use block::suite::*;
pub use block::context::*;
pub use block::example::*;
pub enum Block<T> {
Context(Context<T>),
Example(Example<T>),
}
impl<T> Block<T> {
pub fn num_examples(&self) -> usize {
match self {
&Block::Context(ref context) => context.num_examples(),
&Block::Example(_) => 1,
}
}
}
unsafe impl<T> Send for Block<T>
where
T: Send,
{
}
unsafe impl<T> Sync for Block<T>
where
T: Sync,
{
}