Skip to content

Commit

Permalink
fix(gas): add import of string in gas functions
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Jan 6, 2021
1 parent 753b159 commit fe03899
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gas/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod validation;

use crate::std::cmp::min;
use crate::std::mem;
use crate::std::string::String;
use crate::std::vec::Vec;

use parity_wasm::{elements, builder};
Expand Down Expand Up @@ -506,9 +507,9 @@ pub fn inject_gas_counter<R: Rules>(
let mut new_names = elements::IndexMap::<String>::default();
for (idx, func) in funcs.names().iter() {
if idx > gas_func {
new_names.insert(idx + 1, func.to_string());
new_names.insert(idx + 1, String::from(func));
} else {
new_names.insert(idx, func.to_string());
new_names.insert(idx, String::from(func));
}
}

Expand Down

0 comments on commit fe03899

Please sign in to comment.