Adding couple of missing commas
This commit is contained in:
parent
6395095659
commit
f129126a82
@ -93,7 +93,7 @@ impl From<hyper::error::Error> for WebappServerError {
|
|||||||
fn from(err: hyper::error::Error) -> Self {
|
fn from(err: hyper::error::Error) -> Self {
|
||||||
match err {
|
match err {
|
||||||
hyper::error::Error::Io(e) => WebappServerError::IoError(e),
|
hyper::error::Error::Io(e) => WebappServerError::IoError(e),
|
||||||
e => WebappServerError::Other(e)
|
e => WebappServerError::Other(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ pub trait Page : Send + Sync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct PageHandler<T : WebApp> {
|
pub struct PageHandler<T : WebApp> {
|
||||||
pub app: T
|
pub app: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: WebApp> Page for PageHandler<T> {
|
impl<T: WebApp> Page for PageHandler<T> {
|
||||||
@ -50,7 +50,7 @@ impl<T: WebApp> Page for PageHandler<T> {
|
|||||||
Err(_) => {
|
Err(_) => {
|
||||||
println!("Error while writing response.");
|
println!("Error while writing response.");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ impl hyper::server::Handler for RestApi {
|
|||||||
res.headers_mut().set(header::ContentType("application/json".parse().unwrap()));
|
res.headers_mut().set(header::ContentType("application/json".parse().unwrap()));
|
||||||
let _ = res.send(self.list_pages().as_bytes());
|
let _ = res.send(self.list_pages().as_bytes());
|
||||||
},
|
},
|
||||||
_ => ()
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,14 +75,14 @@ impl Router {
|
|||||||
Some(ref host) => {
|
Some(ref host) => {
|
||||||
format!("http://{}:{}{}", host.hostname, host.port.unwrap_or(80), path)
|
format!("http://{}:{}{}", host.hostname, host.port.unwrap_or(80), path)
|
||||||
},
|
},
|
||||||
None => return None
|
None => return None,
|
||||||
};
|
};
|
||||||
|
|
||||||
match Url::parse(&url_string) {
|
match Url::parse(&url_string) {
|
||||||
Ok(url) => Some(url),
|
Ok(url) => Some(url),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ impl Router {
|
|||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
(None, req)
|
(None, req)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user