Skip to content

Commit

Permalink
Replaced PathError with PathResolutionError
Browse files Browse the repository at this point in the history
  • Loading branch information
myFavShrimp committed Aug 3, 2023
1 parent 803a729 commit 1cc026f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/turf_internals/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pub enum Error {
TomlParseError(#[from] toml::de::Error),
#[error("error reading cargo manifest - {0}")]
ManifestError(#[from] std::io::Error),
#[error("error reading path '{1}' - {0}")]
PathError(std::io::Error, PathBuf),
#[error("error compiling scss file '{1}' - {0}")]
GrassError(Box<grass::Error>, PathBuf),
#[error("error transforming css - {0}")]
Expand Down Expand Up @@ -57,7 +55,11 @@ where

match canonicalized_path {
Ok(path) => Error::GrassError(value.0, path),
Err(e) => Error::PathError(e, value.1.as_ref().to_path_buf()),
Err(e) => PathResolutionError {
path: value.1.as_ref().to_path_buf(),
source: e,
}
.into(),
}
}
}
Expand Down

0 comments on commit 1cc026f

Please sign in to comment.