diff options
Diffstat (limited to 'crates/shirabe/src/json')
| -rw-r--r-- | crates/shirabe/src/json/json_file.rs | 2 | ||||
| -rw-r--r-- | crates/shirabe/src/json/json_manipulator.rs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs index 5da1a27..27540fe 100644 --- a/crates/shirabe/src/json/json_file.rs +++ b/crates/shirabe/src/json/json_file.rs @@ -338,7 +338,7 @@ impl JsonFile { schema_file: Option<&str>, ) -> Result<bool> { let mut is_composer_schema_file = false; - let mut schema_file = match schema_file { + let schema_file = match schema_file { Some(f) => f.into(), None => { if schema == Self::LOCK_SCHEMA { diff --git a/crates/shirabe/src/json/json_manipulator.rs b/crates/shirabe/src/json/json_manipulator.rs index 71530d4..c62e31e 100644 --- a/crates/shirabe/src/json/json_manipulator.rs +++ b/crates/shirabe/src/json/json_manipulator.rs @@ -5,9 +5,9 @@ use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ InvalidArgumentException, LogicException, PhpMixed, addcslashes, array_key_exists, array_keys, - array_reverse, count, empty, explode, implode, in_array, is_array, is_int, is_numeric, - json_decode, preg_quote, rtrim, str_contains, str_repeat, str_replace, strlen, strnatcmp, - strpos, substr, trim, uksort, + array_reverse, empty, explode, implode, in_array, is_array, is_int, is_numeric, json_decode, + preg_quote, rtrim, str_contains, str_repeat, str_replace, strlen, strnatcmp, strpos, substr, + trim, uksort, }; use crate::json::JsonFile; @@ -838,7 +838,7 @@ impl JsonManipulator { // no node or empty node let main_node_value = decoded.as_array().and_then(|a| a.get(main_node)); - if main_node_value.map(|v| empty(v)).unwrap_or(true) { + if main_node_value.map(empty).unwrap_or(true) { return Ok(true); } @@ -1220,7 +1220,7 @@ impl JsonManipulator { // no node or empty node let main_node_value = decoded.as_array().and_then(|a| a.get(main_node)); - if main_node_value.map(|v| empty(v)).unwrap_or(true) { + if main_node_value.map(empty).unwrap_or(true) { return Ok(true); } |
