From 565c0fd24c616adce50e940fc33b7bf9137a21cc Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 20 Aug 2024 17:19:26 -0500 Subject: fix(tvix/castore): u32 -> u64 in DirectoryError::SizeOverflow message Fix a discrepancy in the error message for DirectoryError::SizeOverflow. The message indicates that the SizeOverflow error occurs when total size exceeds u32::MAX, but that's not true. All size fields within the castore's internal Directory ADT are u64, and the SizeOverflow error is only returned after a call to the checked_add implementation on u64. See tvix/castore/nodes/directory.rs +111 and tvix/castore/nodes/directory.rs +88 as of this commit. Change-Id: I74d161ea8927362e1cb601ba163489aa96fb91b1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12259 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/castore/src/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/castore/src/errors.rs') diff --git a/tvix/castore/src/errors.rs b/tvix/castore/src/errors.rs index 3c044d9d79cb..7b5d1a422c99 100644 --- a/tvix/castore/src/errors.rs +++ b/tvix/castore/src/errors.rs @@ -47,7 +47,7 @@ pub enum DirectoryError { /// Node failed validation #[error("invalid node with name {}: {:?}", .0, .1.to_string())] InvalidNode(PathComponent, ValidateNodeError), - #[error("Total size exceeds u32::MAX")] + #[error("Total size exceeds u64::MAX")] SizeOverflow, /// Invalid name encountered #[error("Invalid name: {0}")] -- cgit 1.4.1