Skip to content

Commit

Permalink
chore: less allocs
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Mar 28, 2024
1 parent f6e2163 commit b379fea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/types/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b379fea

Please sign in to comment.