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
#[cfg(feature = "radix")]
macro_rules! debug_assert_radix {
($radix:expr) => (debug_assert!($radix.as_i32() >= 2 && $radix.as_i32() <= 36, "Numerical base must be from 2-36.");)
}
#[cfg(not(feature = "radix"))]
macro_rules! debug_assert_radix {
($radix:expr) => (debug_assert!($radix.as_i32() == 10, "Numerical base must be 10.");)
}
#[cfg(feature = "radix")]
macro_rules! assert_radix {
($radix:expr) => (assert!($radix.as_i32() >= 2 && $radix.as_i32() <= 36, "Numerical base must be from 2-36.");)
}
macro_rules! assert_buffer {
($slc:ident, $size:expr) => ({
assert!($slc.len() >= $size);
});
}