From 53f1fb395f33e0fb8db9aebd09ea9082f650f9f1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jun 2026 17:45:06 +0900 Subject: refactor: add linter --- crates/shirabe/src/json/json_file.rs | 13 ++++++------- crates/shirabe/src/json/json_manipulator.rs | 8 +++----- crates/shirabe/src/json/mod.rs | 8 -------- 3 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 crates/shirabe/src/json/mod.rs (limited to 'crates/shirabe/src/json') diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs index b38de1e..c0b8816 100644 --- a/crates/shirabe/src/json/json_file.rs +++ b/crates/shirabe/src/json/json_file.rs @@ -1,6 +1,12 @@ //! ref: composer/src/Composer/Json/JsonFile.php +use crate::downloader::TransportException; +use crate::io::IOInterface; +use crate::io::IOInterfaceImmutable; use crate::io::io_interface; +use crate::json::JsonValidationException; +use crate::util::Filesystem; +use crate::util::HttpDownloader; use crate::util::Silencer; use anyhow::Result; use indexmap::IndexMap; @@ -14,13 +20,6 @@ use shirabe_php_shim::{ str_ends_with, str_repeat, strlen, strpos, usleep, }; -use crate::downloader::TransportException; -use crate::io::IOInterface; -use crate::io::IOInterfaceImmutable; -use crate::json::JsonValidationException; -use crate::util::Filesystem; -use crate::util::HttpDownloader; - #[derive(Debug, Clone)] pub struct JsonEncodeOptions { pub unescaped_slashes: bool, diff --git a/crates/shirabe/src/json/json_manipulator.rs b/crates/shirabe/src/json/json_manipulator.rs index c62e31e..043534d 100644 --- a/crates/shirabe/src/json/json_manipulator.rs +++ b/crates/shirabe/src/json/json_manipulator.rs @@ -1,7 +1,9 @@ //! ref: composer/src/Composer/Json/JsonManipulator.php +use crate::json::JsonFile; +use crate::json::json_grammar::{self, ValueKind}; +use crate::repository::PlatformRepository; use indexmap::IndexMap; - use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ InvalidArgumentException, LogicException, PhpMixed, addcslashes, array_key_exists, array_keys, @@ -10,10 +12,6 @@ use shirabe_php_shim::{ trim, uksort, }; -use crate::json::JsonFile; -use crate::json::json_grammar::{self, ValueKind}; -use crate::repository::PlatformRepository; - #[derive(Debug)] pub struct JsonManipulator { contents: String, diff --git a/crates/shirabe/src/json/mod.rs b/crates/shirabe/src/json/mod.rs deleted file mode 100644 index e5c3406..0000000 --- a/crates/shirabe/src/json/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub mod json_file; -pub(crate) mod json_grammar; -pub mod json_manipulator; -pub mod json_validation_exception; - -pub use json_file::*; -pub use json_manipulator::*; -pub use json_validation_exception::*; -- cgit v1.3.1