Merge pull request #3254 from WillLillis/bug_fix

fix: Add lifetime to matches function
This commit is contained in:
Max Brunsfeld 2024-04-03 19:51:44 -07:00 committed by GitHub
commit 9ae61feac9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2336,8 +2336,8 @@ impl QueryCursor {
/// Because multiple patterns can match the same set of nodes, one match may contain
/// captures that appear *before* some of the captures from a previous match.
#[doc(alias = "ts_query_cursor_exec")]
pub fn matches<'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(
&mut self,
pub fn matches<'query, 'cursor: 'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(
&'cursor mut self,
query: &'query Query,
node: Node<'tree>,
text_provider: T,