Die error_chain, die (#10747)
* Replace error chain for network error * Fix usages and add manual From impls * OnDemand Error and remove remaining dependencies * Die error_chain, die. * DIE * Hasta la vista, baby
This commit is contained in:
@@ -710,7 +710,7 @@ impl Configuration {
|
||||
for line in &lines {
|
||||
match validate_node_url(line).map(Into::into) {
|
||||
None => continue,
|
||||
Some(sync::ErrorKind::AddressResolve(_)) => return Err(format!("Failed to resolve hostname of a boot node: {}", line)),
|
||||
Some(sync::Error::AddressResolve(_)) => return Err(format!("Failed to resolve hostname of a boot node: {}", line)),
|
||||
Some(_) => return Err(format!("Invalid node address format given for a boot node: {}", line)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ pub fn to_bootnodes(bootnodes: &Option<String>) -> Result<Vec<String>, String> {
|
||||
Some(ref x) if !x.is_empty() => x.split(',').map(|s| {
|
||||
match validate_node_url(s).map(Into::into) {
|
||||
None => Ok(s.to_owned()),
|
||||
Some(sync::ErrorKind::AddressResolve(_)) => Err(format!("Failed to resolve hostname of a boot node: {}", s)),
|
||||
Some(sync::Error::AddressResolve(_)) => Err(format!("Failed to resolve hostname of a boot node: {}", s)),
|
||||
Some(_) => Err(format!("Invalid node address format given for a boot node: {}", s)),
|
||||
}
|
||||
}).collect(),
|
||||
|
||||
Reference in New Issue
Block a user