From 9e7ee27253a98267c8830779bb85872f3b2d4a5a Mon Sep 17 00:00:00 2001 From: JMARyA Date: Fri, 17 Nov 2023 23:11:05 +0100 Subject: [PATCH] cargo fmt --- src/args.rs | 4 ++-- src/main.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/args.rs b/src/args.rs index 77e97a0..0e5aa3a 100644 --- a/src/args.rs +++ b/src/args.rs @@ -12,9 +12,9 @@ pub fn get_args() -> ArgMatches { .arg( Arg::new("test") .short('t') - .long("test") + .long("test") .required(false) - .value_names(&["key", "val"]) + .value_names(["key", "val"]) .number_of_values(2) .help("Add test case to json patch"), ) diff --git a/src/main.rs b/src/main.rs index c774d43..8d6f6f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -156,14 +156,15 @@ fn main() { let path = test_cases.get(0).unwrap(); let val = test_cases.get(1).unwrap(); - diff.as_array_mut().unwrap().insert(0, + diff.as_array_mut().unwrap().insert( + 0, serde_json::json!( { "op": "test", "path": path, "value": val } - ) + ), ); }