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
36
37
38
39
40
41
#![cfg_attr(not(feature = "power-of-two"), allow(unused_macros))]
#![doc(hidden)]
#[cfg(not(feature = "safe"))]
macro_rules! index_unchecked {
($x:ident[$i:expr]) => {
*$x.get_unchecked($i)
};
}
#[cfg(not(feature = "safe"))]
#[allow(unknown_lints, unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
*$x.get_unchecked_mut($i)
};
}
#[cfg(feature = "safe")]
macro_rules! index_unchecked {
($x:ident[$i:expr]) => {
$x[$i]
};
}
#[cfg(feature = "safe")]
#[allow(unknown_lints, unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
$x[$i]
};
}