Skip to content

Commit 4b260ff

Browse files
committed
Give contents their own lifetime
1 parent 8a2c58b commit 4b260ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/ark/src/treesitter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,14 @@ impl<'ts_query> TsQuery<'ts_query> {
674674
}
675675

676676
/// Run the query on `contents` and collect all captures as (capture_name, node) pairs
677-
pub(crate) fn all_captures<'tree, 'query>(
677+
pub(crate) fn all_captures<'tree, 'query, 'contents>(
678678
&'query mut self,
679679
node: tree_sitter::Node<'tree>,
680-
contents: &'query [u8],
680+
contents: &'contents [u8],
681681
) -> AllCaptures<'tree, 'query>
682682
where
683683
'tree: 'query,
684+
'contents: 'query,
684685
{
685686
let query = match self.query {
686687
QueryStorage::Owned(ref q) => q,

0 commit comments

Comments
 (0)