Skip to content

Commit

Permalink
Merge pull request #1777 from dtolnay/anygroup
Browse files Browse the repository at this point in the history
Make Cursor::any_group public
  • Loading branch information
dtolnay authored Nov 2, 2024
2 parents 648fca9 + 31d93e1 commit 12f068c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ impl<'a> Cursor<'a> {
None
}

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

0 comments on commit 12f068c

Please sign in to comment.