From bb35a86f3001997674028bb4a586dd653989d4f7 Mon Sep 17 00:00:00 2001
From: Artem Vorotnikov <artem@vorotnikov.me>
Date: Fri, 13 Sep 2024 07:31:23 +0300
Subject: [PATCH] Update deps

---
 Cargo.toml    | 4 ++--
 src/encode.rs | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 7c9bf8c..17c513d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ arrayvec = { version = "0.7", default-features = false }
 auto_impl = "1"
 bytes = { version = "1", default-features = false }
 ethnum = { version = "1", default-features = false, optional = true }
-ethereum-types = { version = "0.14", default-features = false, optional = true }
+ethereum-types = { version = "0.15", default-features = false, optional = true }
 fastrlp-derive = { version = "0.2", path = "derive", optional = true }
 
 [dev-dependencies]
@@ -22,7 +22,7 @@ fastrlp-test = { path = ".", package = "fastrlp", features = [
     "ethbloom",
     "ethereum-types",
 ] }
-criterion = "0.4"
+criterion = "0.5"
 hex-literal = "0.4"
 
 [features]
diff --git a/src/encode.rs b/src/encode.rs
index 5b4f209..808bcfc 100644
--- a/src/encode.rs
+++ b/src/encode.rs
@@ -247,8 +247,7 @@ mod ethereum_types_support {
                 }
 
                 fn encode(&self, out: &mut dyn bytes::BufMut) {
-                    let mut temp_arr = [0u8; $n_bytes];
-                    self.to_big_endian(&mut temp_arr[..]);
+                    let temp_arr = self.to_big_endian();
                     // cut the leading zeros after converting to big endian
                     let sliced = &temp_arr[(self.leading_zeros() / 8) as usize..];
                     sliced.encode(out);