about summary refs log tree commit diff
path: root/tvix/store
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-07-18T17·46+0300
committerclbot <clbot@tvl.fyi>2023-07-21T18·04+0000
commit5364fcb12708667a2dc698a689d00d70d1bf75af (patch)
tree54e100f28cb687202cd5e05ae95c145a3ab780b0 /tvix/store
parent728de762fd556015ad0085b4946a0915a15654e9 (diff)
feat(tvix/nix-compat): fold NameError into Error r/6432
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 <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/store')
-rw-r--r--tvix/store/src/proto/tests/pathinfo.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/store/src/proto/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs
index 54a76fc6c554..57104a5fda19 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<StorePath, Valid
     },
     Err(ValidatePathInfoError::InvalidNodeName(
         "invalid".to_string(),
-        store_path::Error::InvalidName(store_path::NameError::InvalidName("".to_string()))
+        store_path::Error::InvalidLength()
     ));
     "invalid node name"
 )]