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 <me@griff.name>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
This commit is contained in:
Florian Klink 2024-04-04 19:02:51 +03:00 committed by clbot
parent e7af8e0d62
commit 226b5c4b20

View file

@ -95,7 +95,7 @@ pub async fn read_bytes_unchecked<R: AsyncReadExt + Unpin>(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