File tree 1 file changed +3
-9
lines changed
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -345,9 +345,7 @@ impl RevealedSparseTrie {
345
345
} else {
346
346
let value = self . values . get ( & path) . unwrap ( ) ;
347
347
let rlp_node = LeafNodeRef { key, value } . rlp ( & mut self . rlp_buf ) ;
348
- if let Some ( node_hash) = rlp_node. as_hash ( ) {
349
- * hash = Some ( node_hash) ;
350
- }
348
+ * hash = rlp_node. as_hash ( ) ;
351
349
rlp_node
352
350
}
353
351
}
@@ -360,9 +358,7 @@ impl RevealedSparseTrie {
360
358
let ( _, child) = rlp_node_stack. pop ( ) . unwrap ( ) ;
361
359
self . rlp_buf . clear ( ) ;
362
360
let rlp_node = ExtensionNodeRef :: new ( key, & child) . rlp ( & mut self . rlp_buf ) ;
363
- if let Some ( node_hash) = rlp_node. as_hash ( ) {
364
- * hash = Some ( node_hash) ;
365
- }
361
+ * hash = rlp_node. as_hash ( ) ;
366
362
rlp_node
367
363
} else {
368
364
path_stack. extend ( [ path, child_path] ) ; // need to get rlp node for child first
@@ -400,9 +396,7 @@ impl RevealedSparseTrie {
400
396
self . rlp_buf . clear ( ) ;
401
397
let rlp_node = BranchNodeRef :: new ( & branch_value_stack_buf, * state_mask)
402
398
. rlp ( & mut self . rlp_buf ) ;
403
- if let Some ( node_hash) = rlp_node. as_hash ( ) {
404
- * hash = Some ( node_hash) ;
405
- }
399
+ * hash = rlp_node. as_hash ( ) ;
406
400
rlp_node
407
401
}
408
402
} ;
You can’t perform that action at this time.
0 commit comments