Use join instead of connect

This commit is contained in:
messense 2015-08-12 17:53:28 +08:00
parent 8c20000a47
commit 160ed940ae

View file

@ -131,7 +131,7 @@ impl RobotFileParser {
allow_all: Cell::new(false),
url: parsed_url.clone(),
host: parsed_url.domain().unwrap().to_owned(),
path: parsed_url.path().unwrap().connect("/"),
path: parsed_url.path().unwrap().join("/"),
last_checked: Cell::new(0i64),
}
}
@ -157,7 +157,7 @@ impl RobotFileParser {
let parsed_url = Url::parse(url).unwrap();
self.url = parsed_url.clone();
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);
}