mlx_rs/macros/internal.rs
1/// See `assertEqual` in the swift binding tests
2#[allow(unused_macros)]
3macro_rules! assert_array_all_close {
4 ($a:tt, $b:tt) => {
5 let _b: Array = $b.into();
6 let assert = $a.all_close(&_b, None, None, None).unwrap();
7 assert!(assert.item::<bool>());
8 };
9}
10
11#[allow(unused_macros)]
12macro_rules! cfg_safetensors {
13 ($($item:item)*) => {
14 $(
15 #[cfg(feature = "safetensors")]
16 $item
17 )*
18 };
19}