script: Rename some parent to child (#38498)

I believe there was some code migration but name's not been changed.

Testing: No behaviour change.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-08-07 01:39:38 +08:00 committed by GitHub
parent 0233ad5e40
commit 56033d844a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -883,12 +883,12 @@ impl Node {
})
}
pub(crate) fn is_inclusive_ancestor_of(&self, parent: &Node) -> bool {
self == parent || self.is_ancestor_of(parent)
pub(crate) fn is_inclusive_ancestor_of(&self, child: &Node) -> bool {
self == child || self.is_ancestor_of(child)
}
pub(crate) fn is_ancestor_of(&self, parent: &Node) -> bool {
parent.ancestors().any(|ancestor| &*ancestor == self)
pub(crate) fn is_ancestor_of(&self, child: &Node) -> bool {
child.ancestors().any(|ancestor| &*ancestor == self)
}
pub(crate) fn is_shadow_including_inclusive_ancestor_of(&self, node: &Node) -> bool {