diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-11 22:52:11 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-11 22:52:11 +0800 |
| commit | 55c7ea778be2f3ce44d88440607ac8d4117e31d2 (patch) | |
| tree | d6258230a382e8054dfc1ac50f9c55cb2bc70c2a /systems/_framework/src | |
| parent | 4effbd209edf96637d7da2b7d29ea1a6de3c637a (diff) | |
Add dependencies and constants for vault system
Diffstat (limited to 'systems/_framework/src')
| -rw-r--r-- | systems/_framework/src/space.rs | 4 | ||||
| -rw-r--r-- | systems/_framework/src/space/error.rs | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/systems/_framework/src/space.rs b/systems/_framework/src/space.rs index c57fa26..79c9b37 100644 --- a/systems/_framework/src/space.rs +++ b/systems/_framework/src/space.rs @@ -1,5 +1,5 @@ use crate::space::error::SpaceError; -use just_fmt::fmt_path::{PathFormatConfig, PathFormatError, fmt_path, fmt_path_custom}; +use just_fmt::fmt_path::{PathFormatConfig, fmt_path, fmt_path_custom}; use std::{ cell::Cell, env::current_dir, @@ -114,7 +114,7 @@ impl<T: SpaceRoot> Space<T> { /// Set the current directory explicitly. /// /// This clears any cached space directory. - pub fn set_current_dir(&mut self, path: PathBuf) -> Result<(), PathFormatError> { + pub fn set_current_dir(&mut self, path: PathBuf) -> Result<(), SpaceError> { self.update_space_dir(None); self.current_dir = Some(fmt_path(path)?); Ok(()) diff --git a/systems/_framework/src/space/error.rs b/systems/_framework/src/space/error.rs index 50e673f..33ee6e4 100644 --- a/systems/_framework/src/space/error.rs +++ b/systems/_framework/src/space/error.rs @@ -8,6 +8,9 @@ pub enum SpaceError { #[error("IO error: {0}")] Io(#[from] std::io::Error), + + #[error("Other: {0}")] + Other(String), } impl PartialEq for SpaceError { |
