From 709629d5d3ab856d9711aedbe32ceaafac5369af Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 14 Mar 2026 00:17:02 +0800 Subject: Add framework system and refactor module exports --- systems/sheet/src/sheet.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'systems/sheet/src') diff --git a/systems/sheet/src/sheet.rs b/systems/sheet/src/sheet.rs index 5ee2db7..cca2450 100644 --- a/systems/sheet/src/sheet.rs +++ b/systems/sheet/src/sheet.rs @@ -552,9 +552,7 @@ impl TryFrom<&[u8]> for SheetData { } impl RWData for SheetData { - type DataType = SheetData; - - async fn read(path: &PathBuf) -> Result { + async fn read(path: &PathBuf) -> Result { let read_data = SheetData::full_read(&mut SheetData::empty(), path).await; match read_data { Ok(_) => { @@ -573,7 +571,7 @@ impl RWData for SheetData { } async fn write( - data: Self::DataType, + data: SheetData, path: &PathBuf, ) -> Result<(), asset_system::error::DataWriteError> { let write_data = tokio::fs::write(path, data.as_bytes()).await; @@ -585,7 +583,7 @@ impl RWData for SheetData { } } - fn test_data() -> Self::DataType { + fn test_data() -> SheetData { let sheet = SheetData::empty().pack("sheet"); let mut sheet = sheet; sheet @@ -601,7 +599,7 @@ impl RWData for SheetData { sheet.unpack() } - fn verify_data(data_a: Self::DataType, data_b: Self::DataType) -> bool { + fn verify_data(data_a: SheetData, data_b: SheetData) -> bool { data_a == data_b } } -- cgit