Updated the unit tests to include NetworkError

This commit is contained in:
Ravi Shankar 2016-02-20 01:11:41 +05:30 committed by Josh Matthews
parent 5e6f32a59b
commit 945a2c66e1
4 changed files with 22 additions and 23 deletions

View file

@ -309,13 +309,13 @@ impl HttpRequest for WrappedHttpRequest {
#[derive(Debug)]
pub struct LoadError {
url: Url,
error: LoadErrorType,
reason: String,
pub url: Url,
pub error: LoadErrorType,
pub reason: String,
}
impl LoadError {
fn new(url: Url, error: LoadErrorType, reason: String) -> LoadError {
pub fn new(url: Url, error: LoadErrorType, reason: String) -> LoadError {
LoadError {
url: url,
error: error,
@ -324,7 +324,7 @@ impl LoadError {
}
}
#[derive(Debug)]
#[derive(Eq, PartialEq, Debug)]
pub enum LoadErrorType {
Cancelled,
Connection,