From 767b5486c6f012f8c329f59c483f06acc498c076 Mon Sep 17 00:00:00 2001 From: WillLillis Date: Sun, 5 Jan 2025 01:23:26 -0500 Subject: [PATCH] docs: clarify data returned by `QueryCaptures` during iteration --- lib/binding_rust/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/binding_rust/lib.rs b/lib/binding_rust/lib.rs index f8be963c..a9b41a20 100644 --- a/lib/binding_rust/lib.rs +++ b/lib/binding_rust/lib.rs @@ -304,6 +304,9 @@ pub struct QueryMatches<'query, 'tree: 'query, T: TextProvider, I: AsRef<[u8] } /// A sequence of [`QueryCapture`]s associated with a given [`QueryCursor`]. +/// +/// During iteration, each element contains a [`QueryMatch`] and index. The index can +/// be used to access the new capture inside of the [`QueryMatch::captures`]'s [`captures`]. pub struct QueryCaptures<'query, 'tree: 'query, T: TextProvider, I: AsRef<[u8]>> { ptr: *mut ffi::TSQueryCursor, query: &'query Query,