Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ keywords = ["html", "css", "selector", "scraping"]

authors = [
"June McEnroe <june@causal.agency>",
"Vivek Kushwaha <yoursvivek@gmail.com>",
]
license = "ISC"

Expand All @@ -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]
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/element_ref/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
8 changes: 1 addition & 7 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
}
}
2 changes: 1 addition & 1 deletion src/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Simple>; 1]>,
Expand Down