diff --git a/src/interpreter/mod.rs b/src/interpreter/mod.rs index a4bf7e2..e8c6771 100644 --- a/src/interpreter/mod.rs +++ b/src/interpreter/mod.rs @@ -74,6 +74,12 @@ impl ::std::fmt::Display for DummyUserError { fn fmt(&self, _f: &mut ::std::fmt::Formatter) -> Result<(), ::std::fmt::Error> { Ok(()) } } +impl From for Error where U: UserError + Sized { + fn from(e: U) -> Self { + Error::User(e) + } +} + mod env; mod env_native; mod imports;