Skip to content

Commit 369cd17

Browse files
authored
Update rlp to v0.5.2 (#45)
* Update rlp to v0.5.2 * Fix fmt Signed-off-by: koushiro <[email protected]> Signed-off-by: koushiro <[email protected]>
1 parent 24739cc commit 369cd17

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

Cargo.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ bytes = { version = "1.0", default-features = false }
1313
ethereum-types = { version = "0.13.1", default-features = false, features = ["rlp", "codec"] }
1414
hash-db = { version = "0.15", default-features = false }
1515
hash256-std-hasher = { version = "0.15", default-features = false }
16-
rlp = { version = "0.5", default-features = false }
17-
rlp-derive = "0.1"
16+
rlp = { version = "0.5.2", default-features = false, features = ["derive"] }
1817
sha3 = { version = "0.10", default-features = false }
1918
triehash = { version = "0.8", default-features = false }
2019

@@ -42,6 +41,3 @@ std = [
4241
"sha3/std",
4342
"triehash/std",
4443
]
45-
46-
[workspace]
47-
members = []

rustfmt.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
hard_tabs = true
1+
hard_tabs = true
2+
merge_derives = false

src/account.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use ethereum_types::{H256, U256};
2-
use rlp_derive::{RlpDecodable, RlpEncodable};
32

4-
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
3+
#[derive(Clone, Debug, PartialEq, Eq)]
4+
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
55
#[cfg_attr(feature = "with-codec", derive(codec::Encode, codec::Decode))]
66
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
77
pub struct Account {

src/header.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use ethereum_types::{Bloom, H160, H256, H64, U256};
2-
use rlp_derive::{RlpDecodable, RlpEncodable};
32
use sha3::{Digest, Keccak256};
43

54
use crate::Bytes;
65

7-
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
6+
#[derive(Clone, Debug, PartialEq, Eq)]
7+
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
88
#[cfg_attr(
99
feature = "with-codec",
1010
derive(codec::Encode, codec::Decode, scale_info::TypeInfo)

src/log.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::Bytes;
22
use alloc::vec::Vec;
33
use ethereum_types::{H160, H256};
4-
use rlp_derive::{RlpDecodable, RlpEncodable};
54

6-
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
5+
#[derive(Clone, Debug, PartialEq, Eq)]
6+
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
77
#[cfg_attr(
88
feature = "with-codec",
99
derive(codec::Encode, codec::Decode, scale_info::TypeInfo)

src/receipt.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use alloc::vec::Vec;
33
use bytes::BytesMut;
44
use ethereum_types::{Bloom, H256, U256};
55
use rlp::{Decodable, DecoderError, Rlp};
6-
use rlp_derive::{RlpDecodable, RlpEncodable};
76

8-
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
7+
#[derive(Clone, Debug, PartialEq, Eq)]
8+
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
99
#[cfg_attr(
1010
feature = "with-codec",
1111
derive(codec::Encode, codec::Decode, scale_info::TypeInfo)
@@ -18,7 +18,8 @@ pub struct FrontierReceiptData {
1818
pub logs: Vec<Log>,
1919
}
2020

21-
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
21+
#[derive(Clone, Debug, PartialEq, Eq)]
22+
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
2223
#[cfg_attr(
2324
feature = "with-codec",
2425
derive(codec::Encode, codec::Decode, scale_info::TypeInfo)

src/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use hash_db::Hasher;
66
use sha3::{Digest, Keccak256};
77

88
/// Concrete `Hasher` impl for the Keccak-256 hash
9-
#[derive(Default, Debug, Clone, PartialEq)]
9+
#[derive(Default, Debug, Clone, PartialEq, Eq)]
1010
pub struct KeccakHasher;
1111
impl Hasher for KeccakHasher {
1212
type Out = H256;

0 commit comments

Comments
 (0)