Skip to content

Commit 450cafa

Browse files
authored
Merge pull request #13 from spk/update-request
Update reqwest to 0.8
2 parents 832eb63 + 79471ef commit 450cafa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version = "0.9.0"
1414
url = "1.2"
1515

1616
[dependencies.reqwest]
17-
version = "0.7"
17+
version = "0.8"
1818
optional = true
1919

2020
[dependencies.clippy]

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ impl<'a> RobotFileParser<'a> {
254254
#[cfg(feature = "http")]
255255
/// Reads the robots.txt URL and feeds it to the parser.
256256
pub fn read(&self) {
257-
let client = Client::new().expect("client failed to construct");
258-
let mut request = client.get(self.url.clone()).expect("Invalid URL");
257+
let client = Client::new();
258+
let mut request = client.get(self.url.clone());
259259
let request = request.header(UserAgent::new(USER_AGENT.to_owned()));
260260
let mut res = match request.send() {
261261
Ok(res) => res,

0 commit comments

Comments
 (0)