This is the first time we actually use the Matcher trait, still for a small
subset of all matchers defined in Python.
While I haven't yet actually measured the performance of this, I have tried
to avoid any unnecessary allocations. This forces the use of heavy lifetimes
annotations which I am not sure we can simplify, although I would be happy
to be proven wrong.
It seems to me that you can just use one lifetime here since the two input limit the output.
https://rust.godbolt.org/z/57bf6T But maybe I over-simplified the problem.