about summary refs log tree commit diff
path: root/tvix/castore/src/import/error.rs
diff options
context:
space:
mode:
authorConnor Brewster <cbrewster@hey.com>2024-04-21T22·40-0500
committerclbot <clbot@tvl.fyi>2024-04-24T15·41+0000
commitd2e67f021ecb54435d5ac57aa431364417eb59fa (patch)
tree84e23282225675365b64d7415fd2793e95be5aeb /tvix/castore/src/import/error.rs
parent79698c470cf9e043204741b727ce34041fcb1e32 (diff)
refactor(tvix/castore): add separate Error enum for archives r/8002
The `Error` enum for the `imports` crate has both filesystem and archive
specific errors and was starting to get messy.

This adds a separate `Error` enum for archive-specific errors and then
keeps a single `Archive` variant in the top-level import `Error` for all
archive errors.

Change-Id: I4cd0746c864e5ec50b1aa68c0630ef9cd05176c7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11498
Tested-by: BuildkiteCI
Autosubmit: Connor Brewster <cbrewster@hey.com>
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore/src/import/error.rs')
-rw-r--r--tvix/castore/src/import/error.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/tvix/castore/src/import/error.rs b/tvix/castore/src/import/error.rs
index 8cd4f95ffb52..15dd0664deaa 100644
--- a/tvix/castore/src/import/error.rs
+++ b/tvix/castore/src/import/error.rs
@@ -19,20 +19,8 @@ pub enum Error {
     #[error("unable to read {0}: {1}")]
     UnableToRead(PathBuf, std::io::Error),
 
-    #[error("error reading from archive: {0}")]
-    Archive(std::io::Error),
-
     #[error("unsupported file {0} type: {1:?}")]
     UnsupportedFileType(PathBuf, FileType),
-
-    #[error("unsupported tar entry {0} type: {1:?}")]
-    UnsupportedTarEntry(PathBuf, tokio_tar::EntryType),
-
-    #[error("symlink missing target {0}")]
-    MissingSymlinkTarget(PathBuf),
-
-    #[error("unexpected number of top level directory entries")]
-    UnexpectedNumberOfTopLevelEntries,
 }
 
 impl From<CastoreError> for Error {