mirror of
https://github.com/getzola/zola
synced 2024-12-13 13:52:28 +00:00
Touch up dead link error message (#698)
This commit is contained in:
parent
ec61a57841
commit
bada9ab93f
1 changed files with 3 additions and 3 deletions
|
@ -280,11 +280,11 @@ impl Site {
|
|||
|
||||
let errors: Vec<_> = pool.install(|| {
|
||||
all_links.par_iter().filter_map(|(path, link)| {
|
||||
let res = check_url(link);
|
||||
let res = check_url(&link);
|
||||
if res.is_valid() {
|
||||
None
|
||||
} else {
|
||||
Some((path, res))
|
||||
Some((path, link, res))
|
||||
}
|
||||
}).collect()
|
||||
});
|
||||
|
@ -293,7 +293,7 @@ impl Site {
|
|||
Ok(())
|
||||
} else {
|
||||
let msg = errors.into_iter()
|
||||
.map(|(path, check_res)| format!("Dead link in {:?}: {:?}", path, check_res))
|
||||
.map(|(path, link, check_res)| format!("Dead link in {} to {}: {}", path.to_string_lossy(), link, check_res.message()))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
Err(Error {
|
||||
|
|
Loading…
Reference in a new issue