mirror of https://github.com/status-im/evmc.git
rust: make input a slice reference to ExecutionMessage
This commit is contained in:
parent
4382bd3662
commit
5d72543ac3
|
@ -100,7 +100,7 @@ impl ExecutionMessage {
|
|||
gas: i64,
|
||||
destination: Address,
|
||||
sender: Address,
|
||||
input: Option<Vec<u8>>,
|
||||
input: Option<&[u8]>,
|
||||
value: Uint256,
|
||||
create2_salt: Bytes32,
|
||||
) -> Self {
|
||||
|
@ -111,7 +111,11 @@ impl ExecutionMessage {
|
|||
gas,
|
||||
destination,
|
||||
sender,
|
||||
input,
|
||||
input: if input.is_some() {
|
||||
Some(input.unwrap().to_vec())
|
||||
} else {
|
||||
None
|
||||
},
|
||||
value,
|
||||
create2_salt,
|
||||
}
|
||||
|
@ -621,7 +625,7 @@ mod tests {
|
|||
4466,
|
||||
destination,
|
||||
sender,
|
||||
Some(input.clone()),
|
||||
Some(&input),
|
||||
value,
|
||||
create2_salt,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue