File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ version = "0.8.2"
14
14
url = " 1.2"
15
15
16
16
[dependencies .reqwest ]
17
- version = " 0.5 "
17
+ version = " 0.7 "
18
18
optional = true
19
19
20
20
[dependencies .clippy ]
Original file line number Diff line number Diff line change @@ -255,8 +255,8 @@ impl<'a> RobotFileParser<'a> {
255
255
/// Reads the robots.txt URL and feeds it to the parser.
256
256
pub fn read ( & self ) {
257
257
let client = Client :: new ( ) . expect ( "client failed to construct" ) ;
258
- let request = client. get ( self . url . clone ( ) )
259
- . header ( UserAgent ( USER_AGENT . to_owned ( ) ) ) ;
258
+ let mut request = client. get ( self . url . clone ( ) ) . expect ( "Invalid URL" ) ;
259
+ let request = request . header ( UserAgent :: new ( USER_AGENT . to_owned ( ) ) ) ;
260
260
let mut res = match request. send ( ) {
261
261
Ok ( res) => res,
262
262
Err ( _) => {
You can’t perform that action at this time.
0 commit comments