mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(ast): rename lifetime (#6922)
Rename lifetime to make clear it's for a temporary borrow, and not lifetime of the arena (which is what we conventionally use `'a` for).
This commit is contained in:
parent
6ca01b9c35
commit
c41c013b4d
1 changed files with 4 additions and 4 deletions
|
|
@ -22,15 +22,15 @@ pub fn has_comments_between(comments: &[Comment], span: Span) -> bool {
|
|||
}
|
||||
|
||||
/// Double-ended iterator over a range of comments, by starting position.
|
||||
pub struct CommentsRange<'a> {
|
||||
comments: &'a [Comment],
|
||||
pub struct CommentsRange<'c> {
|
||||
comments: &'c [Comment],
|
||||
range: (Bound<u32>, Bound<u32>),
|
||||
current_start: usize,
|
||||
current_end: usize,
|
||||
}
|
||||
|
||||
impl<'a> CommentsRange<'a> {
|
||||
fn new(comments: &'a [Comment], start: Bound<u32>, end: Bound<u32>) -> Self {
|
||||
impl<'c> CommentsRange<'c> {
|
||||
fn new(comments: &'c [Comment], start: Bound<u32>, end: Bound<u32>) -> Self {
|
||||
// Directly skip all comments that are already known to start
|
||||
// outside the requested range.
|
||||
let partition_start = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue