Skip to content

Make some minor improvements to the code base#140

Merged
cfvescovo merged 3 commits intorust-scraper:masterfrom
adamreichold:boy-scouting
Aug 12, 2023
Merged

Make some minor improvements to the code base#140
cfvescovo merged 3 commits intorust-scraper:masterfrom
adamreichold:boy-scouting

Conversation

@adamreichold
Copy link
Member

  • Bump locked Cargo dependencies
  • Extend Clippy coverage to include all targets
  • Add ElementRef::attr forwarding method

Our code base is littered with calls to element.value().attr("attribute") and this little method would make this much more readable by shorting it to element.attr("attribute").

Generally, I would also consider impl Deref<Target=Element> instead of impl Deref<Target=NodeRef> but that would be incompatible and more intrusive.

Our code base is littered with calls to `element.value().attr("attribute")` and
this little method would make this much more readable by shorting it to
`element.attr("attribute")`.

Generally, I would also consider `impl Deref<Target=Element>` instead of `impl
Deref<Target=NodeRef>` but that would be incompatible and more intrusive.
@cfvescovo
Copy link
Member

LGTM

@cfvescovo cfvescovo merged commit 71a588c into rust-scraper:master Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants