Skip to content

Commit 580465a

Browse files
author
Grigoriy Simonov
committed
update-primitive-types
1 parent b213104 commit 580465a

File tree

4 files changed

+42
-12
lines changed

4 files changed

+42
-12
lines changed

Cargo.lock

Lines changed: 39 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sha3-const = { version = "0.1.1", default-features = false }
2323
# evm-coder reexports those proc-macro
2424
evm-coder-procedural = { workspace = true }
2525
# Evm uses primitive-types for H160, H256 and others
26-
primitive-types = { version = "0.12.1", default-features = false }
26+
primitive-types = { version = "0.13.1", default-features = false }
2727
# Evm doesn't have reexports for log and others
2828
ethereum = { version = "0.15.0", default-features = false }
2929
# We have tuple-heavy code in solidity.rs

src/abi/impls.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,7 @@ impl AbiType for U256 {
434434
}
435435
impl AbiEncode for U256 {
436436
fn enc(&self, out: &mut AbiEncoder) {
437-
let mut word = [0; ABI_WORD_SIZE as usize];
438-
self.to_big_endian(&mut word);
437+
let word = self.to_big_endian();
439438
out.append_head(word)
440439
}
441440
}

src/events.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ impl ToTopic for H256 {
3131

3232
impl ToTopic for U256 {
3333
fn to_topic(&self) -> H256 {
34-
let mut out = [0u8; 32];
35-
self.to_big_endian(&mut out);
34+
let out = self.to_big_endian();
3635
H256(out)
3736
}
3837
}

0 commit comments

Comments
 (0)