Added panic message to failures.

This commit is contained in:
Alan Jeffrey 2016-04-13 16:09:48 -05:00
parent dfb482a2b7
commit 8c0fa01884
9 changed files with 88 additions and 37 deletions

View file

@ -32,6 +32,12 @@ pub enum LayoutMsg {
ViewportConstrained(PipelineId, ViewportConstraints),
}
impl From<Failure> for LayoutMsg {
fn from(failure: Failure) -> LayoutMsg {
LayoutMsg::Failure(failure)
}
}
/// Messages from the script to the constellation.
#[derive(Deserialize, Serialize)]
pub enum ScriptMsg {
@ -86,3 +92,9 @@ pub enum ScriptMsg {
/// Update the pipeline Url, which can change after redirections.
SetFinalUrl(PipelineId, Url),
}
impl From<Failure> for ScriptMsg {
fn from(failure: Failure) -> ScriptMsg {
ScriptMsg::Failure(failure)
}
}