Skip to content

Commit 8f4f0ea

Browse files
committed
Fix final clippy format string warnings
- Fix format string in src/context.rs PyValueError - Fix debug! macro format strings in src/lib.rs - Ensures all clippy warnings are resolved for CI
1 parent e283e43 commit 8f4f0ea

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎src/context.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ impl Context {
9494
pub fn add_variable(&mut self, name: String, value: &Bound<'_, PyAny>) -> PyResult<()> {
9595
let value = crate::RustyPyType(value).try_into_value().map_err(|e| {
9696
pyo3::exceptions::PyValueError::new_err(format!(
97-
"Failed to convert variable '{}': {}",
98-
name, e
97+
"Failed to convert variable '{name}': {e}"
9998
))
10099
})?;
101100
self.variables.insert(name, value);

‎src/lib.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ fn should_skip_integer_conversion(expr: &str, start: usize, _end: usize) -> bool
284284

285285
/// Always preprocesses expression to promote integer literals to floats (used when context has mixed types)
286286
fn preprocess_expression_for_mixed_arithmetic_always(expr: &str) -> String {
287-
debug!("Always preprocessing expression: {}", expr);
287+
debug!("Always preprocessing expression: {expr}");
288288

289289
// Convert all integer literals to floats
290290
// This is a more comprehensive approach than operator-by-operator processing
@@ -309,7 +309,7 @@ fn preprocess_expression_for_mixed_arithmetic_always(expr: &str) -> String {
309309
// Update offset for subsequent replacements (we added ".0", so +2)
310310
offset += 2;
311311
}
312-
debug!("Final processed expression: {}", result);
312+
debug!("Final processed expression: {result}");
313313
result
314314
}
315315

@@ -412,7 +412,7 @@ impl TryIntoValue for RustyPyType<'_> {
412412
/// Returns a String representation of the result
413413
#[pyfunction(signature = (src, evaluation_context=None))]
414414
fn evaluate(src: String, evaluation_context: Option<&Bound<'_, PyAny>>) -> PyResult<RustyCelType> {
415-
debug!("Evaluating CEL expression: {}", src);
415+
debug!("Evaluating CEL expression: {src}");
416416

417417
// Preprocess expression for better mixed int/float arithmetic compatibility
418418
// First check if expression itself has mixed literals

0 commit comments

Comments
 (0)