mirror of
https://github.com/danbulant/robotparser-rs
synced 2026-07-04 18:50:37 +00:00
Use join instead of connect
This commit is contained in:
parent
8c20000a47
commit
160ed940ae
1 changed files with 2 additions and 2 deletions
|
|
@ -131,7 +131,7 @@ impl RobotFileParser {
|
||||||
allow_all: Cell::new(false),
|
allow_all: Cell::new(false),
|
||||||
url: parsed_url.clone(),
|
url: parsed_url.clone(),
|
||||||
host: parsed_url.domain().unwrap().to_owned(),
|
host: parsed_url.domain().unwrap().to_owned(),
|
||||||
path: parsed_url.path().unwrap().connect("/"),
|
path: parsed_url.path().unwrap().join("/"),
|
||||||
last_checked: Cell::new(0i64),
|
last_checked: Cell::new(0i64),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -157,7 +157,7 @@ impl RobotFileParser {
|
||||||
let parsed_url = Url::parse(url).unwrap();
|
let parsed_url = Url::parse(url).unwrap();
|
||||||
self.url = parsed_url.clone();
|
self.url = parsed_url.clone();
|
||||||
self.host = parsed_url.domain().unwrap().to_owned();
|
self.host = parsed_url.domain().unwrap().to_owned();
|
||||||
self.path = parsed_url.path().unwrap().connect("/");
|
self.path = parsed_url.path().unwrap().join("/");
|
||||||
self.last_checked.set(0i64);
|
self.last_checked.set(0i64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue