Skip to content

Commit 31d93e1

Browse files
committed
Make Cursor::any_group public
1 parent 648fca9 commit 31d93e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/buffer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ impl<'a> Cursor<'a> {
256256
None
257257
}
258258

259-
pub(crate) fn any_group(self) -> Option<(Cursor<'a>, Delimiter, DelimSpan, Cursor<'a>)> {
259+
/// If the cursor is pointing at a `Group`, returns a cursor into the group
260+
/// and one pointing to the next `TokenTree`.
261+
pub fn any_group(self) -> Option<(Cursor<'a>, Delimiter, DelimSpan, Cursor<'a>)> {
260262
if let Entry::Group(group, end_offset) = self.entry() {
261263
let delimiter = group.delimiter();
262264
let span = group.delim_span();

0 commit comments

Comments
 (0)