mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-02-07 19:40:01 +02:00
Merge pull request #126 from marshallpierce/patch-2
Use rustls instead of openssl
This commit is contained in:
commit
7e0670e6b7
@ -11,7 +11,7 @@ Cargo project and `reqwest` it as a dependency with:
|
||||
```shell
|
||||
$ cargo new link-checker
|
||||
$ cd link-checker
|
||||
$ cargo add --features blocking reqwest
|
||||
$ cargo add --features blocking,rustls-tls reqwest
|
||||
```
|
||||
|
||||
> If `cargo add` fails with `error: no such subcommand`, then please edit the
|
||||
@ -33,7 +33,7 @@ The `cargo add` calls will update the `Cargo.toml` file to look like this:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
reqwest = { version = "0.11.12", features = ["blocking"] }
|
||||
reqwest = { version = "0.11.12", features = ["blocking", "rustls-tls"] }
|
||||
scraper = "0.13.0"
|
||||
thiserror = "1.0.37"
|
||||
```
|
||||
@ -64,9 +64,6 @@ Run the code in `src/main.rs` with
|
||||
$ cargo run
|
||||
```
|
||||
|
||||
> If `cargo run` fails with an error mentioning OpenSSL, ensure that you have
|
||||
> the OpenSSL headers installed by running `sudo apt install libssl-dev`.
|
||||
|
||||
## Tasks
|
||||
|
||||
* Use threads to check the links in parallel: send the URLs to be checked to a
|
||||
|
Loading…
x
Reference in New Issue
Block a user