Skip to content

Commit 15af515

Browse files
Seulgi Kimsgkim126
authored andcommitted
Use Default instead of new method to create a H256
1 parent 9b5a423 commit 15af515

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

state/src/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub mod helpers {
5252
/// Creates new state with empty state root
5353
/// Used for tests.
5454
pub fn empty_top_state(mut db: StateDB) -> TopLevelState {
55-
let mut root = H256::new();
55+
let mut root = H256::default();
5656
// init trie and reset root too null
5757
let _ = TrieFactory::create(db.as_hashdb_mut(), &mut root);
5858

@@ -62,7 +62,7 @@ pub mod helpers {
6262
/// Creates new state with empty state root
6363
/// Used for tests.
6464
pub fn empty_top_state_with_metadata(mut db: StateDB, params: CommonParams) -> TopLevelState {
65-
let mut root = H256::new();
65+
let mut root = H256::default();
6666
// init trie and reset root too null
6767
{
6868
let mut t = TrieFactory::create(db.as_hashdb_mut(), &mut root);

0 commit comments

Comments
 (0)