From 4e806f032da4c2a8f9a59c31cf47e7da3258f106 Mon Sep 17 00:00:00 2001 From: Adam Esterline Date: Mon, 17 Jun 2024 12:44:26 -0600 Subject: [PATCH] fix: 1.79.0 lints (#40) Fix new lints errors found in 1.79.0 --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 59abf396..422816b7 100644 --- a/README.md +++ b/README.md @@ -38,25 +38,23 @@ Then you can evaluate an expression with JSON input like this: use bumpalo::Bump; use jsonata_rs::JsonAta; -fn main() { - // Create an arena for allocating values, this will go away in future except for advanced use cases - let arena = Bump::new(); +// Create an arena for allocating values, this will go away in future except for advanced use cases +let arena = Bump::new(); - // Provide some JSON input, this could be read from a file or come from the network - let input = "{ \"name\": \"world\" }"; +// Provide some JSON input, this could be read from a file or come from the network +let input = "{ \"name\": \"world\" }"; - // The JSONata expression to evaluate - let expr = "\"Hello, \" & name & \"!\""; +// The JSONata expression to evaluate +let expr = "\"Hello, \" & name & \"!\""; - // Parse the expression - this could fail - let jsonata = JsonAta::new(expr, &arena).unwrap(); +// Parse the expression - this could fail +let jsonata = JsonAta::new(expr, &arena).unwrap(); - // Evaluate the expression against the input - this could fail - let result = jsonata.evaluate(Some(input)).unwrap(); +// Evaluate the expression against the input - this could fail +let result = jsonata.evaluate(Some(input)).unwrap(); - // Serialize the result into JSON - println!("{}", result.serialize(false)); -} +// Serialize the result into JSON +println!("{}", result.serialize(false)); ``` There's also a basic CLI tool: