|
@@ -6,7 +6,6 @@ use config::LinkChecker; |
|
|
use errors::Result; |
|
|
use errors::Result; |
|
|
|
|
|
|
|
|
use std::collections::HashMap; |
|
|
use std::collections::HashMap; |
|
|
use std::error::Error; |
|
|
|
|
|
use std::sync::{Arc, RwLock}; |
|
|
use std::sync::{Arc, RwLock}; |
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq)] |
|
|
#[derive(Clone, Debug, PartialEq)] |
|
@@ -96,7 +95,7 @@ pub fn check_url(url: &str, config: &LinkChecker) -> LinkResult { |
|
|
LinkResult { code: None, error: Some(error_string) } |
|
|
LinkResult { code: None, error: Some(error_string) } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
Err(e) => LinkResult { code: None, error: Some(e.description().to_string()) }, |
|
|
|
|
|
|
|
|
Err(e) => LinkResult { code: None, error: Some(e.to_string()) }, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
LINKS.write().unwrap().insert(url.to_string(), res.clone()); |
|
|
LINKS.write().unwrap().insert(url.to_string(), res.clone()); |
|
|