mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-27 16:34:46 +00:00
Don't panic on invalid response URIs
This commit is contained in:
parent
649f307028
commit
8f6199b5b6
1 changed files with 6 additions and 1 deletions
|
|
@ -105,7 +105,12 @@ async fn suggest_archived_links(archive: Archive, stats: &mut ResponseStats, sho
|
|||
let uri = &response.uri;
|
||||
!(uri.is_data() || uri.is_mail() || uri.is_file())
|
||||
})
|
||||
.map(|(source, response)| (source, response.uri.as_str().try_into().unwrap()))
|
||||
.filter_map(
|
||||
|(source, response)| match response.uri.as_str().try_into() {
|
||||
Ok(url) => Some((source, url)),
|
||||
Err(_) => None,
|
||||
},
|
||||
)
|
||||
.collect::<Vec<(&InputSource, Url)>>();
|
||||
|
||||
let bar = if show_progress {
|
||||
|
|
|
|||
Loading…
Reference in a new issue