fix bug in url from argument handling

This commit is contained in:
Marc Planard 2023-10-13 12:36:23 +02:00
parent 1c231a23a6
commit 7fd582d56d

View File

@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let addr = std::env::args().nth(1) let addr = std::env::args().nth(1)
.unwrap_or_else(|| "www.tmplab.org".to_string()); .unwrap_or_else(|| "www.tmplab.org".to_string());
let links = get_links("https://tmplab.org").await?; let links = get_links(addr.as_ref()).await?;
let links : Vec<Url> = links.into_iter() let links : Vec<Url> = links.into_iter()
.filter(| url | url.host() != Some(Host::Domain(&addr))) .filter(| url | url.host() != Some(Host::Domain(&addr)))
.collect(); .collect();