diff options
author | edef <edef@edef.eu> | 2024-05-01T11·40+0000 |
---|---|---|
committer | edef <edef@edef.eu> | 2024-05-01T13·40+0000 |
commit | 2d7f4135ecf1187c7bad39bf18ebfddc76577e9b (patch) | |
tree | 0f000fe970d5077cf3049687cf30a1516dd99556 /tvix/castore/src/proto | |
parent | 4b3223a621c37ddb55d1b7054cf4ddb120c22de5 (diff) |
feat(tvix/castore/path): use proto::validate_node_name r/8056
Use the shared code for validating node names, since that is what path components represent. Change-Id: I12109c1306b224718faa66cf1f2874c78c1436a7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11566 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore/src/proto')
-rw-r--r-- | tvix/castore/src/proto/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/castore/src/proto/mod.rs b/tvix/castore/src/proto/mod.rs index 39c1bcc6faa0..5374e3ae5a80 100644 --- a/tvix/castore/src/proto/mod.rs +++ b/tvix/castore/src/proto/mod.rs @@ -66,7 +66,7 @@ pub enum ValidateStatBlobResponseError { /// Checks a Node name for validity as an intermediate node. /// We disallow slashes, null bytes, '.', '..' and the empty string. -fn validate_node_name(name: &[u8]) -> Result<(), ValidateNodeError> { +pub(crate) fn validate_node_name(name: &[u8]) -> Result<(), ValidateNodeError> { if name.is_empty() || name == b".." || name == b"." |