Skip to content

Commit

Permalink
fix: tie the lifetime of the cursor to the query in `QueryCursor::cap…
Browse files Browse the repository at this point in the history
…tures()`
  • Loading branch information
WillLillis committed Apr 9, 2024
1 parent 4d8b031 commit cbcb51b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/binding_rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2359,8 +2359,8 @@ impl QueryCursor {
/// This is useful if you don't care about which pattern matched, and just want a single,
/// ordered sequence of captures.
#[doc(alias = "ts_query_cursor_exec")]
pub fn captures<'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(
&mut self,
pub fn captures<'query, 'cursor: 'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(
&'cursor mut self,
query: &'query Query,
node: Node<'tree>,
text_provider: T,
Expand Down

0 comments on commit cbcb51b

Please sign in to comment.