From abc111cdfdf14efe2186f41b6474f7689a9ec137 Mon Sep 17 00:00:00 2001 From: teymour-aldridge Date: Sat, 23 Jul 2022 21:34:33 +0100 Subject: [PATCH 1/2] Update dependencies --- Cargo.toml | 15 +++++++-------- README.md | 6 ------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 581ea298..db57729b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ keywords = ["html", "css", "selector", "scraping"] authors = [ "June McEnroe ", - "Vivek Kushwaha ", ] license = "ISC" @@ -17,16 +16,16 @@ readme = "README.md" [dependencies] cssparser = "0.27" -ego-tree = "0.6" +ego-tree = "0.6.2" html5ever = "0.26" -matches = "0.1.6" -selectors = "0.22" -smallvec = "1" -tendril = "0.4" -indexmap = { version = "1.6.1", optional = true } +matches = "0.1.9" +selectors = "0.22.0" +smallvec = "1.9.0" +tendril = "0.4.3" +indexmap = { version = "1.9.1", optional = true } [dependencies.getopts] -version = "0.2.18" +version = "0.2.21" optional = true [features] diff --git a/README.md b/README.md index 35f62827..f0d7a9d5 100644 --- a/README.md +++ b/README.md @@ -134,9 +134,3 @@ assert_eq!(vec!["Hello, ", "world!"], text); Please feel free to open pull requests. If you're planning on implementing something big (i.e. not fixing a typo, a small bug fix, minor refactor, etc) then please open an issue first. - -## Stargazers over time - -[![Stargazers over time](https://starchart.cc/causal-agent/scraper.svg)](https://starchart.cc/causal-agent/scraper) - -License: ISC From b9190b463f4b4d1f2a3a9db257acf7274f51d5d8 Mon Sep 17 00:00:00 2001 From: teymour-aldridge Date: Sat, 23 Jul 2022 21:39:09 +0100 Subject: [PATCH 2/2] Fix clippy lints. --- src/element_ref/mod.rs | 2 +- src/node.rs | 8 +------- src/selector.rs | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/element_ref/mod.rs b/src/element_ref/mod.rs index 389e2395..e1a7f321 100644 --- a/src/element_ref/mod.rs +++ b/src/element_ref/mod.rs @@ -123,7 +123,7 @@ impl<'a> Iterator for Text<'a> { for edge in &mut self.inner { if let Edge::Open(node) = edge { if let Node::Text(ref text) = node.value() { - return Some(&*text); + return Some(&**text); } } } diff --git a/src/node.rs b/src/node.rs index 6f8c3e67..d536850a 100644 --- a/src/node.rs +++ b/src/node.rs @@ -345,7 +345,7 @@ impl fmt::Debug for Element { } /// HTML Processing Instruction. -#[derive(Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct ProcessingInstruction { /// The PI target. pub target: StrTendril, @@ -360,9 +360,3 @@ impl Deref for ProcessingInstruction { self.data.deref() } } - -impl fmt::Debug for ProcessingInstruction { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!(f, "{:?} {:?}", self, self.data) - } -} diff --git a/src/selector.rs b/src/selector.rs index 435a6369..4974a69a 100644 --- a/src/selector.rs +++ b/src/selector.rs @@ -14,7 +14,7 @@ use crate::ElementRef; /// Wrapper around CSS selectors. /// /// Represents a "selector group", i.e. a comma-separated list of selectors. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Selector { /// The CSS selectors. pub selectors: SmallVec<[parser::Selector; 1]>,