Skip to content

Commit 89b03e8

Browse files
committed
1 parent 49e5ab8 commit 89b03e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/eth.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ fn encode_value(typ: &MemberType, value: &Value) -> Result<Vec<u8>, String> {
302302
DataType::Uint => match value {
303303
Value::String(v) => {
304304
if v.starts_with("0x") || v.starts_with("0X") {
305-
Ok(BigUint::parse_bytes(v[2..].as_bytes(), 16)
305+
Ok(BigUint::parse_bytes(&v.as_bytes()[2..], 16)
306306
.ok_or(format!("could not parse {} as hex", v))?
307307
.to_bytes_be())
308308
} else {

0 commit comments

Comments
 (0)