avoid allocating string
This commit is contained in:
parent
434ed1b91c
commit
34fb39da5b
@ -28,11 +28,11 @@ use ethkey::{Signature, recover as ec_recover};
|
|||||||
use ethjson;
|
use ethjson;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Error(pub String);
|
pub struct Error(pub &'static str);
|
||||||
|
|
||||||
impl From<&'static str> for Error {
|
impl From<&'static str> for Error {
|
||||||
fn from(val: &'static str) -> Self {
|
fn from(val: &'static str) -> Self {
|
||||||
Error(val.to_owned())
|
Error(val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ pub enum Error {
|
|||||||
limit: usize
|
limit: usize
|
||||||
},
|
},
|
||||||
/// Built-in contract failed on given input
|
/// Built-in contract failed on given input
|
||||||
BuiltIn(String),
|
BuiltIn(&'static str),
|
||||||
/// Returned on evm internal error. Should never be ignored during development.
|
/// Returned on evm internal error. Should never be ignored during development.
|
||||||
/// Likely to cause consensus issues.
|
/// Likely to cause consensus issues.
|
||||||
Internal(String),
|
Internal(String),
|
||||||
|
Loading…
Reference in New Issue
Block a user