mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(traverse): correct code comments (#5293)
#5286 changed `TraverseCtx::ancestor` to always return an `Ancestor`. Update doc comments to reflect that.
This commit is contained in:
parent
292d162b23
commit
b43a3948a1
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ impl<'a> TraverseAncestry<'a> {
|
|||
/// Get ancestor of current node.
|
||||
///
|
||||
/// `level` is number of levels above.
|
||||
/// `ancestor(1).unwrap()` is equivalent to `parent()`.
|
||||
/// `ancestor(1)` is equivalent to `parent()`.
|
||||
///
|
||||
/// If `level` is out of bounds (above `Program`), returns `Ancestor::None`.
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ impl<'a> TraverseCtx<'a> {
|
|||
/// Get ancestor of current node.
|
||||
///
|
||||
/// `level` is number of levels above.
|
||||
/// `ancestor(1).unwrap()` is equivalent to `parent()`.
|
||||
/// `ancestor(1)` is equivalent to `parent()`.
|
||||
///
|
||||
/// If `level` is out of bounds (above `Program`), returns `Ancestor::None`.
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue