Fixing all obvious warnings

This commit is contained in:
Tomusdrw
2016-01-19 11:10:38 +01:00
parent db6e6a3e58
commit f169951d4e
12 changed files with 37 additions and 40 deletions

View File

@@ -65,10 +65,11 @@ impl Factory {
fn jit() -> Box<Evm> {
unimplemented!()
}
}
impl Default for Factory {
/// Returns jitvm factory
#[cfg(feature = "jit")]
pub fn default() -> Factory {
fn default() -> Factory {
Factory {
evm: VMType::Jit
}
@@ -76,7 +77,7 @@ impl Factory {
/// Returns native rust evm factory
#[cfg(not(feature = "jit"))]
pub fn default() -> Factory {
fn default() -> Factory {
Factory {
evm: VMType::Interpreter
}

View File

@@ -229,6 +229,7 @@ struct CodeReader<'a> {
code: &'a Bytes
}
#[allow(len_without_is_empty)]
impl<'a> CodeReader<'a> {
/// Get `no_of_bytes` from code and convert to U256. Move PC
fn read(&mut self, no_of_bytes: usize) -> U256 {
@@ -331,6 +332,7 @@ impl evm::Evm for Interpreter {
}
impl Interpreter {
#[allow(cyclomatic_complexity)]
fn get_gas_cost_mem(&self,
ext: &evm::Ext,
instruction: Instruction,