Rename stuff in Numeric for clarity

This commit is contained in:
Rerumu
2022-07-01 14:06:17 -04:00
parent a0596f45e3
commit 627927d366
6 changed files with 32 additions and 35 deletions
+2 -2
View File
@@ -85,8 +85,8 @@ pub fn write_i32(number: i32, w: &mut dyn Write) -> Result<()> {
fn write_i64(number: i64, w: &mut dyn Write) -> Result<()> {
match number {
0 => write!(w, "i64_K_ZERO "),
1 => write!(w, "i64_K_ONE "),
0 => write!(w, "i64_ZERO "),
1 => write!(w, "i64_ONE "),
_ => {
let list = number.to_ne_bytes();
let a = u32::from_ne_bytes(list[0..4].try_into().unwrap());
+1 -1
View File
@@ -335,7 +335,7 @@ fn write_variable_list(ast: &FuncData, w: &mut dyn Write) -> Result<()> {
for data in ast.local_data().iter().filter(|v| v.0 != 0) {
let range = total..total + usize::try_from(data.0).unwrap();
let zero = if data.1 == ValType::I64 {
"i64_K_ZERO "
"i64_ZERO "
} else {
"0 "
};