#![feature(pattern)] use fixed_str_nz3::Closure; #[fixed_len_str::use_fixed_str_nz] #[test] fn b() { assert_eq!("aaabb".matches( Closure::from( |s: FixedStrNZ3| s == "aaa" || s == "bb" ) ).collect::>(), ["aaa"]) }