mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
clippy fix
This commit is contained in:
parent
b5d8f43ef8
commit
29daf06a1b
1 changed files with 10 additions and 14 deletions
|
@ -288,8 +288,7 @@ impl Util {
|
|||
// And finally, move up the parent chain *and* find a sibling
|
||||
// (because this is depth-first traversal, we will have already
|
||||
// seen the parent nodes themselves).
|
||||
loop {
|
||||
if let Some(parent) = node.get_parent() {
|
||||
while let Some(parent) = node.get_parent() {
|
||||
let parent_name = parent.get_name().to_uppercase();
|
||||
if parent_name == "HTML" {
|
||||
break;
|
||||
|
@ -301,9 +300,6 @@ impl Util {
|
|||
} else {
|
||||
node = parent;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue