From 5364fcb12708667a2dc698a689d00d70d1bf75af Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 18 Jul 2023 20:46:55 +0300 Subject: feat(tvix/nix-compat): fold NameError into Error This being a nested error makes things more complicated than necessary. Also, this caused BuildStorePathError to only hold NameError, so refactor these utility functions to either return Error, or BuildStorePathError. Change-Id: I046fb403780cc5135df8b8833a291fc2a90fd913 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8972 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: tazjin --- tvix/store/src/proto/tests/pathinfo.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix/store') diff --git a/tvix/store/src/proto/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs index 54a76fc6c5..57104a5fda 100644 --- a/tvix/store/src/proto/tests/pathinfo.rs +++ b/tvix/store/src/proto/tests/pathinfo.rs @@ -66,7 +66,7 @@ fn validate_no_node( }, Err(ValidatePathInfoError::InvalidNodeName( "invalid".to_string(), - store_path::Error::InvalidName(store_path::NameError::InvalidName("".to_string())) + store_path::Error::InvalidLength() )); "invalid node name" )] @@ -111,7 +111,7 @@ fn validate_directory( }, Err(ValidatePathInfoError::InvalidNodeName( "invalid".to_string(), - store_path::Error::InvalidName(store_path::NameError::InvalidName("".to_string())) + store_path::Error::InvalidLength() )); "invalid node name" )] @@ -141,7 +141,7 @@ fn validate_file(t_file_node: proto::FileNode, t_result: Result