format shall not be used

This commit is contained in:
Pavan-Nambi
2025-09-30 22:31:59 +05:30
parent a8e337fd42
commit 15b5cefa6f

View File

@@ -66,10 +66,10 @@ pub fn exec_printf(values: &[Register]) -> crate::Result<Value> {
} }
let value = &values[args_index].get_value(); let value = &values[args_index].get_value();
match value { match value {
Value::Integer(i) => result.push_str(&format!("{i}")), Value::Integer(i) => result.push_str(&i.to_string()),
Value::Float(f) => { Value::Float(f) => {
let truncated_val = *f as i64; let truncated_val = *f as i64;
result.push_str(&format!("{truncated_val}")); result.push_str(&truncated_val.to_string());
} }
_ => result.push('0'), _ => result.push('0'),
} }