From cfa0755fc41cb643d172bda024d02e172b3f5923 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 15 Feb 2023 16:37:35 +0200 Subject: refactor(tvix/store): avoid casting to the same type The size field already is u32, we don't need to convert here. Change-Id: Ie29819aa2d1d8022e9bd73fcf05b140e45c967a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8107 Reviewed-by: tazjin Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/store/src/proto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/store') diff --git a/tvix/store/src/proto.rs b/tvix/store/src/proto.rs index fc7fa1eff9..a01f09fa8f 100644 --- a/tvix/store/src/proto.rs +++ b/tvix/store/src/proto.rs @@ -220,7 +220,7 @@ impl Directory { + self .directories .iter() - .fold(0, |acc: u32, e| (acc + 1 + e.size) as u32) + .fold(0, |acc: u32, e| (acc + 1 + e.size)) } /// Calculates the digest of a Directory, which is the blake3 hash of a -- cgit 1.4.1