diff --git a/Cargo.toml b/Cargo.toml index b5efe29..15d5146 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ version = "0.9.0" url = "1.2" [dependencies.reqwest] -version = "0.7" +version = "0.8" optional = true [dependencies.clippy] diff --git a/src/lib.rs b/src/lib.rs index deedeea..34ce3aa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -254,8 +254,8 @@ impl<'a> RobotFileParser<'a> { #[cfg(feature = "http")] /// Reads the robots.txt URL and feeds it to the parser. pub fn read(&self) { - let client = Client::new().expect("client failed to construct"); - let mut request = client.get(self.url.clone()).expect("Invalid URL"); + let client = Client::new(); + let mut request = client.get(self.url.clone()); let request = request.header(UserAgent::new(USER_AGENT.to_owned())); let mut res = match request.send() { Ok(res) => res,