fn test_chimera() {
let regex = "(regex)";
let patterns = Patterns::from_str(regex).unwrap();
let db = patterns.build().unwrap();
let mut scratch = db.alloc_scratch().unwrap();
db.scan(
"input with regex word",
&mut scratch,
|_id, _from, _to, _size, captured| {
let captures = match captured {
None => todo!(),
Some(captures) => {
for cap in captures {
let a = cap.range();
}
}
};
Matching::Continue
},
|_err_type, _id| Matching::Continue,
);
}
The compiler says that she could not infer type for captures. While I think it's pretty clear captures is &[hyperscan::chimera::Capture]
The compiler says that she could not infer type for
captures
. While I think it's pretty clear captures is&[hyperscan::chimera::Capture]