From 5ad2785e07fabcd1a75f0d267f52140c0425a3df Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 2 Dec 2017 23:51:52 +0800 Subject: [PATCH] Fix some clippy warnings --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 34ce3aa..898a841 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ //! robots.txt parser for Rust //! //! The robots.txt Exclusion Protocol is implemented as specified in -//! http://www.robotstxt.org/norobots-rfc.txt +//! //! //! # Installation //! @@ -54,7 +54,7 @@ use reqwest::StatusCode; use reqwest::Response; #[cfg(feature = "http")] -const USER_AGENT: &'static str = "robotparser-rs (https://crates.io/crates/robotparser)"; +const USER_AGENT: &str = "robotparser-rs (https://crates.io/crates/robotparser)"; /// A rule line is a single "Allow:" (allowance==True) or "Disallow:" /// (allowance==False) followed by a path.""" @@ -263,7 +263,7 @@ impl<'a> RobotFileParser<'a> { return; } }; - let status = res.status().clone(); + let status = res.status(); match status { StatusCode::Unauthorized | StatusCode::Forbidden => { self.disallow_all.set(true);