diff options
Diffstat (limited to 'tvix/castore/src/errors.rs')
-rw-r--r-- | tvix/castore/src/errors.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tvix/castore/src/errors.rs b/tvix/castore/src/errors.rs index e03cfa5a5207..6c213cb06743 100644 --- a/tvix/castore/src/errors.rs +++ b/tvix/castore/src/errors.rs @@ -3,6 +3,8 @@ use thiserror::Error; use tokio::task::JoinError; use tonic::Status; +use crate::path::PathComponent; + /// Errors related to communication with the store. #[derive(Debug, Error, PartialEq)] pub enum Error { @@ -37,11 +39,11 @@ impl From<crate::digests::Error> for ValidateNodeError { #[derive(Debug, thiserror::Error, PartialEq)] pub enum DirectoryError { /// Multiple elements with the same name encountered - #[error("{:?} is a duplicate name", .0.as_bstr())] - DuplicateName(Vec<u8>), + #[error("{:?} is a duplicate name", .0)] + DuplicateName(PathComponent), /// Node failed validation - #[error("invalid node with name {:?}: {:?}", .0.as_bstr(), .1.to_string())] - InvalidNode(bytes::Bytes, ValidateNodeError), + #[error("invalid node with name {}: {:?}", .0, .1.to_string())] + InvalidNode(PathComponent, ValidateNodeError), #[error("Total size exceeds u32::MAX")] SizeOverflow, /// Invalid name encountered |