Skip to content

Document how to make the library Send in README.md#318

Open
Internal-Compiler-Error wants to merge 2 commits into
rust-scraper:masterfrom
Internal-Compiler-Error:master
Open

Document how to make the library Send in README.md#318
Internal-Compiler-Error wants to merge 2 commits into
rust-scraper:masterfrom
Internal-Compiler-Error:master

Conversation

@Internal-Compiler-Error

Copy link
Copy Markdown

I had been using the library along with tokio but always found the Html type wasn't Send annoying. Turns out a feature flag already existed that solved my problem but wasn't documented. This just documents it.

Comment thread scraper/README.md Outdated
```

### Using the library across threads
By default, many types of this library are `!Send` due to some internal data

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can be explicit here that this is due to the Tendril type used by the html5ever crate as this is also the only thing the feature flag will affect.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, this next commit is more clear about this.

Although this got me wondering, why list Tendril as a dependency when html5ever basically exposes as a module? Won't using the bundled version stop you from worrying about their compatibility?

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