chore(tvix/store): update ParseStorePathError messages

Change-Id: I49799393a1e35b4475566819111beb57a628c555
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7801
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Florian Klink 2023-01-09 14:30:30 +00:00 committed by flokli
parent ed3b28aa02
commit cfa42fd19a

View file

@ -16,11 +16,11 @@ pub const STORE_DIR_WITH_SLASH: &str = "/nix/store/";
/// Errors that can occur during the validation of name characters.
#[derive(Debug, PartialEq, Eq, Error)]
pub enum ParseStorePathError {
#[error("Dash is missing")]
#[error("Dash is missing between hash and name")]
MissingDash(),
#[error("Hash encoding is invalid {0}")]
#[error("Hash encoding is invalid: {0}")]
InvalidHashEncoding(DecodeError),
#[error("Invalid name {0}")]
#[error("Invalid name: {0}")]
InvalidName(String),
#[error("Tried to parse an absolute path which was missing the store dir prefix.")]
MissingStoreDir(),