From 2528aa3e184ea6a8ae703c7b7efe072e298cb0b7 Mon Sep 17 00:00:00 2001 From: Jan Lukas Gernert Date: Sat, 4 Mar 2023 17:55:17 +0100 Subject: [PATCH] fmt --- src/full_text_parser/readability/mod.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/full_text_parser/readability/mod.rs b/src/full_text_parser/readability/mod.rs index 2a2f123..a3ffe27 100644 --- a/src/full_text_parser/readability/mod.rs +++ b/src/full_text_parser/readability/mod.rs @@ -131,10 +131,12 @@ impl Readability { } else if !Util::is_whitespace(&child) { let mut new_node = Node::new("p", None, &document) .map_err(|()| FullTextParserError::Readability)?; - let mut old_node = node_ref.replace_child_node(new_node.clone(), child).map_err(|error| { - log::error!("{error}"); - FullTextParserError::Readability - })?; + let mut old_node = node_ref + .replace_child_node(new_node.clone(), child) + .map_err(|error| { + log::error!("{error}"); + FullTextParserError::Readability + })?; new_node.add_child(&mut old_node).map_err(|error| { log::error!("{error}"); @@ -345,7 +347,7 @@ impl Readability { // non_significant_whitespace: false, // }); // std::fs::write("doc.html", &html).unwrap(); - + // The scores shouldn't get too low. let score_threshold = last_score / 3.0;