Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/crates/polars-utils/src/macros.rs
6939 views
1
#[macro_export]
2
macro_rules! matches_any_order {
3
($expression1:expr, $expression2:expr, $( $pattern1:pat_param )|+, $( $pattern2:pat_param )|+) => {
4
(matches!($expression1, $( $pattern1 )|+) && matches!($expression2, $( $pattern2)|+)) ||
5
matches!($expression2, $( $pattern1 ) |+) && matches!($expression1, $( $pattern2)|+)
6
}
7
}
8
9
#[macro_export]
10
macro_rules! no_call_const {
11
() => {{
12
const { assert!(false, "should not be called") }
13
unreachable!()
14
}};
15
}
16
17