From: Ian Jackson Date: Mon, 3 May 2021 13:02:02 +0000 (+0100) Subject: apitest: New Explode error X-Git-Tag: otter-0.6.0~442 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2f4e8f0f43872c713e8f236efbae57bc731273f9;p=otter.git apitest: New Explode error Signed-off-by: Ian Jackson --- diff --git a/apitest/apitest.rs b/apitest/apitest.rs index 5bb53ad0..eda2c60e 100644 --- a/apitest/apitest.rs +++ b/apitest/apitest.rs @@ -88,6 +88,18 @@ pub struct Instance(pub InstanceName); impl AsRef for Opts { fn as_ref(&self) -> &Opts { self } } +pub enum Explode { } +impl From for Explode { + fn from(e: E) -> Explode { panic!("exploding on error: {}", e) } +} +impl From for anyhow::Error { + fn from(e: Explode) -> AE { match e { } } +} +/* +impl From for E { + fn from(e: Explode) -> E { match e { } } +}*/ + // -------------------- Substition -------------------- pub trait Substitutor {