1 | use predicates::prelude::*; |
---|---|
2 | use predicates_tree::CaseTreeExt; |
3 | |
4 | fn main() { |
5 | let pred = predicate::ne(5).not().and(predicate::ge(5)); |
6 | |
7 | let var = 5; |
8 | let case = pred.find_case(true, &var); |
9 | if let Some(case) = case { |
10 | println!("var is {}", var); |
11 | println!("{}", case.tree()); |
12 | } |
13 | } |
14 |