Skip to content

Commit

Permalink
Make Cursor::any_group public
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 2, 2024
1 parent 648fca9 commit 31d93e1
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 31d93e1

Please sign in to comment.