mirror of
https://github.com/danbulant/robotparser-rs
synced 2026-05-26 21:41:55 +00:00
Fix some clippy warnings
This commit is contained in:
parent
3b24290e5c
commit
5ad2785e07
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
//! robots.txt parser for Rust
|
//! robots.txt parser for Rust
|
||||||
//!
|
//!
|
||||||
//! The robots.txt Exclusion Protocol is implemented as specified in
|
//! The robots.txt Exclusion Protocol is implemented as specified in
|
||||||
//! http://www.robotstxt.org/norobots-rfc.txt
|
//! <http://www.robotstxt.org/norobots-rfc.txt>
|
||||||
//!
|
//!
|
||||||
//! # Installation
|
//! # Installation
|
||||||
//!
|
//!
|
||||||
|
|
@ -54,7 +54,7 @@ use reqwest::StatusCode;
|
||||||
use reqwest::Response;
|
use reqwest::Response;
|
||||||
|
|
||||||
#[cfg(feature = "http")]
|
#[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:"
|
/// A rule line is a single "Allow:" (allowance==True) or "Disallow:"
|
||||||
/// (allowance==False) followed by a path."""
|
/// (allowance==False) followed by a path."""
|
||||||
|
|
@ -263,7 +263,7 @@ impl<'a> RobotFileParser<'a> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let status = res.status().clone();
|
let status = res.status();
|
||||||
match status {
|
match status {
|
||||||
StatusCode::Unauthorized | StatusCode::Forbidden => {
|
StatusCode::Unauthorized | StatusCode::Forbidden => {
|
||||||
self.disallow_all.set(true);
|
self.disallow_all.set(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue