From 226b5c4b2087b0e2e0a4edfc2c518cfcb61b9e76 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 4 Apr 2024 19:02:51 +0300 Subject: refactor(tvix/nix-compat): make padding_len pub(crate) Let's make this usable for the entire crate. Change-Id: I754408908a00296ee80dd52680f84b8a7cb22317 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11354 Tested-by: BuildkiteCI Reviewed-by: Brian Olsen Autosubmit: flokli Reviewed-by: picnoir picnoir --- tvix/nix-compat/src/wire/bytes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvix/nix-compat/src/wire/bytes.rs b/tvix/nix-compat/src/wire/bytes.rs index a050b161048b..1a25daca8b4f 100644 --- a/tvix/nix-compat/src/wire/bytes.rs +++ b/tvix/nix-compat/src/wire/bytes.rs @@ -95,7 +95,7 @@ pub async fn read_bytes_unchecked(r: &mut R) -> std::io /// Computes the number of bytes we should add to len (a length in /// bytes) to be alined on 64 bits (8 bytes). -fn padding_len(len: u64) -> u8 { +pub(crate) fn padding_len(len: u64) -> u8 { let modulo = len % 8; if modulo == 0 { 0 -- cgit 1.4.1