File tree 1 file changed +4
-4
lines changed
cmd/resource-code-exporter/src
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ pub fn import_from_statedb(
44
44
println ! ( "record len: {:?}" , record. len( ) ) ;
45
45
46
46
let code_state_set = if !record[ 1 ] . is_empty ( ) && !record[ 2 ] . is_empty ( ) {
47
- let code_state_hash: String = serde_json :: from_str ( & record[ 1 ] ) ? ;
47
+ let code_state_hash = & record[ 1 ] ;
48
48
let code_state_set_str = & record[ 2 ] ;
49
49
assert_eq ! (
50
50
code_state_hash,
@@ -56,13 +56,13 @@ pub fn import_from_statedb(
56
56
} ;
57
57
58
58
let resource_state_set = if !record[ 3 ] . is_empty ( ) && !record[ 4 ] . is_empty ( ) {
59
- let resrouce_blob_hash : String = serde_json :: from_str ( & record[ 3 ] ) ? ;
59
+ let resource_blob_hash = & record[ 3 ] ;
60
60
let resource_state_set_str = & record[ 4 ] ;
61
61
assert_eq ! (
62
- resrouce_blob_hash ,
62
+ resource_blob_hash ,
63
63
HashValue :: sha3_256_of( resource_state_set_str. as_bytes( ) ) . to_hex_literal( )
64
64
) ;
65
- Some ( serde_json:: from_str ( resource_state_set_str) ?)
65
+ Some ( serde_json:: from_str :: < StateSet > ( resource_state_set_str) ?)
66
66
} else {
67
67
None
68
68
} ;
You can’t perform that action at this time.
0 commit comments