aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/json
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/json')
-rw-r--r--crates/shirabe/src/json/json_file.rs13
-rw-r--r--crates/shirabe/src/json/json_manipulator.rs8
-rw-r--r--crates/shirabe/src/json/mod.rs8
3 files changed, 9 insertions, 20 deletions
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::*;