fmt
This commit is contained in:
parent
05527b05db
commit
628815ac0f
|
@ -211,7 +211,8 @@ impl Compiler {
|
||||||
loop {
|
loop {
|
||||||
let instruction = &body[context.position];
|
let instruction = &body[context.position];
|
||||||
|
|
||||||
self.compile_instruction(context, instruction).map_err(|err| {
|
self.compile_instruction(context, instruction)
|
||||||
|
.map_err(|err| {
|
||||||
Error(format!(
|
Error(format!(
|
||||||
"At instruction {:?}(@{}): {}",
|
"At instruction {:?}(@{}): {}",
|
||||||
instruction, context.position, err
|
instruction, context.position, err
|
||||||
|
|
|
@ -265,8 +265,7 @@ pub fn validate_module(module: Module) -> Result<ValidatedModule, Error> {
|
||||||
.bodies()
|
.bodies()
|
||||||
.get(index as usize)
|
.get(index as usize)
|
||||||
.ok_or(Error(format!("Missing body for function {}", index)))?;
|
.ok_or(Error(format!("Missing body for function {}", index)))?;
|
||||||
let code =
|
let code = Compiler::compile(&context, function, function_body).map_err(|e| {
|
||||||
Compiler::compile(&context, function, function_body).map_err(|e| {
|
|
||||||
let Error(ref msg) = e;
|
let Error(ref msg) = e;
|
||||||
Error(format!(
|
Error(format!(
|
||||||
"Function #{} reading/validation error: {}",
|
"Function #{} reading/validation error: {}",
|
||||||
|
|
Loading…
Reference in New Issue