From 0b8e6e7d18abb94bd99553dc1d2b0ba5d4f265ea Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 18 Jun 2026 02:47:32 +0800 Subject: refactor: extract shared utilities and add space-system crate Extract rola-vcs/internal_macros into shared utils crates (shared_constants, shared_macros, space-system) and implement the Bucket enum with async space management --- rola-utils/space-system/src/space/error.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 rola-utils/space-system/src/space/error.rs (limited to 'rola-utils/space-system/src/space/error.rs') diff --git a/rola-utils/space-system/src/space/error.rs b/rola-utils/space-system/src/space/error.rs new file mode 100644 index 0000000..33ee6e4 --- /dev/null +++ b/rola-utils/space-system/src/space/error.rs @@ -0,0 +1,23 @@ +#[derive(thiserror::Error, Debug)] +pub enum SpaceError { + #[error("Space not found")] + SpaceNotFound, + + #[error("Path format error: {0}")] + PathFormatError(#[from] just_fmt::fmt_path::PathFormatError), + + #[error("IO error: {0}")] + Io(#[from] std::io::Error), + + #[error("Other: {0}")] + Other(String), +} + +impl PartialEq for SpaceError { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::Io(_), Self::Io(_)) => true, + _ => core::mem::discriminant(self) == core::mem::discriminant(other), + } + } +} -- cgit