From a8e337fd42fa3bbbe6d2af48f52352e7c4f1d3aa Mon Sep 17 00:00:00 2001 From: Pavan-Nambi Date: Sun, 28 Sep 2025 21:19:37 +0530 Subject: [PATCH] fmt,clippy clippy --- core/functions/printf.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/functions/printf.rs b/core/functions/printf.rs index b4609d34e..b71d486ec 100644 --- a/core/functions/printf.rs +++ b/core/functions/printf.rs @@ -65,11 +65,11 @@ pub fn exec_printf(values: &[Register]) -> crate::Result { return Err(LimboError::InvalidArgument("not enough arguments".into())); } let value = &values[args_index].get_value(); - match value { - Value::Integer(i) => result.push_str(&format!("{}", i)), + match value { + Value::Integer(i) => result.push_str(&format!("{i}")), Value::Float(f) => { let truncated_val = *f as i64; - result.push_str(&format!("{}", truncated_val)); + result.push_str(&format!("{truncated_val}")); } _ => result.push('0'), } @@ -314,8 +314,7 @@ mod tests { vec![text("Number: %d"), text("not a number")], text("Number: 0"), ), - - ( + ( vec![text("Truncated float: %d"), float(3.9)], text("Truncated float: 3"), ),