diff --git a/src/evm.rs b/src/evm.rs index c742f29..65bdd6c 100644 --- a/src/evm.rs +++ b/src/evm.rs @@ -353,10 +353,10 @@ impl EVM { if let Output::Call(_) = output { Ok(output.into_data()) } else { - Err(pyerr(output.clone())) + Err(pyerr(output)) } } else { - Err(pyerr(result.clone())) + Err(pyerr(result)) } } diff --git a/src/types/info.rs b/src/types/info.rs index f3c1127..3375899 100644 --- a/src/types/info.rs +++ b/src/types/info.rs @@ -22,8 +22,7 @@ impl AccountInfo { .0 .code .as_ref() - .map(|x| x.bytes().to_vec()) - .map(|bytes| PyBytes::new(py, &bytes).into()) + .map(|bytecode| PyBytes::new(py, bytecode.bytes()).into()) } #[getter]