diff --git a/ethcore/src/builtin.rs b/ethcore/src/builtin.rs index da0ee38e1..bdedd5739 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -28,11 +28,11 @@ use ethkey::{Signature, recover as ec_recover}; use ethjson; #[derive(Debug)] -pub struct Error(pub String); +pub struct Error(pub &'static str); impl From<&'static str> for Error { fn from(val: &'static str) -> Self { - Error(val.to_owned()) + Error(val) } } diff --git a/ethcore/src/evm/evm.rs b/ethcore/src/evm/evm.rs index 0e7a4d968..265b83559 100644 --- a/ethcore/src/evm/evm.rs +++ b/ethcore/src/evm/evm.rs @@ -61,7 +61,7 @@ pub enum Error { limit: usize }, /// Built-in contract failed on given input - BuiltIn(String), + BuiltIn(&'static str), /// Returned on evm internal error. Should never be ignored during development. /// Likely to cause consensus issues. Internal(String),