Skip to content

Commit d569706

Browse files
formatting, missing import
1 parent 3843355 commit d569706

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

vmhost/vmhooks/generate/eiGenWriteRustOpcodeCost.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ use serde::{Deserialize, Serialize};
1212
use std::fs;
1313
use std::path::Path;
1414
15+
use crate::GasSchedule;
16+
1517
`
1618

17-
const configStruct = `#[derive(Deserialize)]
19+
const configStruct = `
20+
#[derive(Deserialize)]
1821
struct Config {
1922
#[serde(rename = "WASMOpcodeCost")]
2023
wasm_opcode_cost: OpcodeCost,
@@ -41,7 +44,8 @@ const implBlock = `impl OpcodeCost {
4144
let config: Config = toml::from_str(content)?;
4245
Ok(config.wasm_opcode_cost)
4346
}
44-
}`
47+
}
48+
`
4549

4650
// WriteRustOpcodeCost generates code for opcode_cost.rs
4751
func WriteRustOpcodeCost(out *eiGenWriter) {
@@ -50,11 +54,10 @@ func WriteRustOpcodeCost(out *eiGenWriter) {
5054
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5155
// !!!!!!!!!!!!!!!!!!!!!! AUTO-GENERATED FILE !!!!!!!!!!!!!!!!!!!!!!
5256
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53-
5457
`)
5558
out.WriteString(useStatements)
5659
out.WriteString("#[derive(Clone, Debug, Default, Deserialize, Serialize, PartialEq)]\n")
57-
out.WriteString("#[serde(default)]")
60+
out.WriteString("#[serde(default)]\n")
5861
out.WriteString("pub struct OpcodeCost {\n")
5962

6063
readFile, err := os.Open("generate/cmd/input/wasmer2_opcodes_short.txt")

0 commit comments

Comments
 (0)