Commit 7ee4feca authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Fixxed formatting

parent 52b8e828
......@@ -766,7 +766,7 @@ impl Instruction {
ret.push_str(" ");
}
}
ret.push_str("}}");
ret.push_str("}");
ret
}
......
......@@ -80,8 +80,7 @@ fn emit_muir_dot(suffix: &str, func: &MuFunctionVersion, vm: &VM) {
emit_muir_dot_inner(&mut file, func_name.clone(), func.content.as_ref().unwrap());
}
fn escape_string(s: String) -> String
{
fn escape_string(s: String) -> String {
s.replace("\"", "\\\"") // Replace " with \"
}
......@@ -124,7 +123,11 @@ fn emit_muir_dot_inner(file: &mut File, f_name: MuName, f_content: &FunctionCont
// all the instructions
for inst in block_content.body.iter() {
write!(file, " {}\\l", escape_string(format!("{}", inst.as_inst_ref()))).unwrap();
write!(
file,
" {}\\l",
escape_string(format!("{}", inst.as_inst_ref()))
).unwrap();
}
// "];
......
......@@ -109,12 +109,7 @@ fn emit_mu_funcdecls(suffix: &str, vm: &VM) {
for f in funcs_guard.values() {
let f_lock = f.read().unwrap();
writeln!(
file,
".funcdecl {}<{}>",
f_lock.name(),
f_lock.sig
).unwrap();
writeln!(file, ".funcdecl {}<{}>", f_lock.name(), f_lock.sig).unwrap();
}
}
......
......@@ -1128,7 +1128,7 @@ impl<'a> VM {
compiler.compile(&mut func_ver);
}
}
None => panic!("whitelist function {} has no version defined", f)
None => error!("whitelist function {} has no version defined", f)
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment