summaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-24 12:37:59 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-24 12:37:59 +0800
commit0ce73b208e46cdea247bf244363f669757a717ff (patch)
tree2df2d717288d90a509123caa5bc73434932448d7 /systems
parent4e783771f6f728d75c83cf08836cb370389e0ff8 (diff)
Replace string_proc with just_fmt in _asset crate
Diffstat (limited to 'systems')
-rw-r--r--systems/_asset/Cargo.toml2
-rw-r--r--systems/_asset/macros/Cargo.toml2
-rw-r--r--systems/_asset/macros/src/lib.rs2
-rw-r--r--systems/_asset/src/asset.rs10
4 files changed, 8 insertions, 8 deletions
diff --git a/systems/_asset/Cargo.toml b/systems/_asset/Cargo.toml
index 5e86bbd..12ac59c 100644
--- a/systems/_asset/Cargo.toml
+++ b/systems/_asset/Cargo.toml
@@ -4,7 +4,7 @@ edition = "2024"
version.workspace = true
[dependencies]
-string_proc = { path = "../../utils/string_proc" }
+just_fmt = "0.1"
asset_macros = { path = "macros" }
tokio = { version = "1.48.0", features = ["full"] }
diff --git a/systems/_asset/macros/Cargo.toml b/systems/_asset/macros/Cargo.toml
index d4142f2..e096958 100644
--- a/systems/_asset/macros/Cargo.toml
+++ b/systems/_asset/macros/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2024"
proc-macro = true
[dependencies]
-string_proc = { path = "../../../utils/string_proc" }
+just_fmt = "0.1"
syn = { version = "2.0", features = ["full", "extra-traits"] }
quote = "1.0"
proc-macro2 = "1.0"
diff --git a/systems/_asset/macros/src/lib.rs b/systems/_asset/macros/src/lib.rs
index 1535af0..e33c0f5 100644
--- a/systems/_asset/macros/src/lib.rs
+++ b/systems/_asset/macros/src/lib.rs
@@ -1,6 +1,6 @@
+use just_fmt::snake_case;
use proc_macro::TokenStream;
use quote::quote;
-use string_proc::snake_case;
use syn::parse_macro_input;
#[proc_macro_derive(RWDataTest)]
diff --git a/systems/_asset/src/asset.rs b/systems/_asset/src/asset.rs
index cdcae3c..5cdc1c8 100644
--- a/systems/_asset/src/asset.rs
+++ b/systems/_asset/src/asset.rs
@@ -7,7 +7,7 @@ use std::{
};
use constants::{LOCK_FILE_PREFIX, TEMP_FILE_PREFIX};
-use string_proc::format_path::format_path;
+use just_fmt::fmt_path::fmt_path;
use crate::{
error::{DataApplyError, DataReadError, DataWriteError, HandleLockError, PrecheckFailed},
@@ -138,7 +138,7 @@ where
let mut edit_path = self.path.clone();
edit_path.set_file_name(format!("{}{}", LOCK_FILE_PREFIX, file_name_str));
- let Ok(edit_path) = format_path(edit_path) else {
+ let Ok(edit_path) = fmt_path(edit_path) else {
return Err(HandleLockError::ParsePathFailed);
};
@@ -166,7 +166,7 @@ where
let mut temp_path = self.path.clone();
temp_path.set_file_name(format!("{}{}", TEMP_FILE_PREFIX, file_name_str));
- let Ok(edit_path) = format_path(temp_path) else {
+ let Ok(edit_path) = fmt_path(temp_path) else {
return Err(HandleLockError::ParsePathFailed);
};
@@ -264,10 +264,10 @@ pub async fn apply_precheck<D>(handle: &Handle<D>) -> Result<(), PrecheckFailed>
where
D: RWData<D>,
{
- let Ok(from) = format_path(&handle.temp_path) else {
+ let Ok(from) = fmt_path(&handle.temp_path) else {
return Err(PrecheckFailed::FormatPathFailed);
};
- let Ok(to) = format_path(&handle.asset_path) else {
+ let Ok(to) = fmt_path(&handle.asset_path) else {
return Err(PrecheckFailed::FormatPathFailed);
};