Adding couple of missing commas

This commit is contained in:
Tomasz Drwięga 2016-04-08 10:13:42 +02:00
parent 6395095659
commit f129126a82
4 changed files with 7 additions and 7 deletions

View File

@ -93,7 +93,7 @@ impl From<hyper::error::Error> for WebappServerError {
fn from(err: hyper::error::Error) -> Self {
match err {
hyper::error::Error::Io(e) => WebappServerError::IoError(e),
e => WebappServerError::Other(e)
e => WebappServerError::Other(e),
}
}
}

View File

@ -26,7 +26,7 @@ pub trait Page : Send + Sync {
}
pub struct PageHandler<T : WebApp> {
pub app: T
pub app: T,
}
impl<T: WebApp> Page for PageHandler<T> {
@ -50,7 +50,7 @@ impl<T: WebApp> Page for PageHandler<T> {
Err(_) => {
println!("Error while writing response.");
Ok(())
}
},
};
}
}

View File

@ -47,7 +47,7 @@ impl hyper::server::Handler for RestApi {
res.headers_mut().set(header::ContentType("application/json".parse().unwrap()));
let _ = res.send(self.list_pages().as_bytes());
},
_ => ()
_ => (),
}
}
}

View File

@ -75,14 +75,14 @@ impl Router {
Some(ref host) => {
format!("http://{}:{}{}", host.hostname, host.port.unwrap_or(80), path)
},
None => return None
None => return None,
};
match Url::parse(&url_string) {
Ok(url) => Some(url),
_ => None,
}
}
},
_ => None,
}
}
@ -103,7 +103,7 @@ impl Router {
},
_ => {
(None, req)
}
},
}
}
}