From e573f8389cad4168ed13a4c4e788415dbcfb994d Mon Sep 17 00:00:00 2001 From: edef Date: Sat, 7 Sep 2024 23:41:23 +0000 Subject: [PATCH] docs(tvix/nix-compat/wire/bytes/reader): None case doesn't exist We always read the length before returning a BytesReader, so len() cannot be called before the length is read. Change-Id: Ifa1cbc2c0923dd24d59e0af5e135ab8ed7314aa9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12453 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/nix-compat/src/wire/bytes/reader/mod.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/tvix/nix-compat/src/wire/bytes/reader/mod.rs b/tvix/nix-compat/src/wire/bytes/reader/mod.rs index 81474df70..77950496e 100644 --- a/tvix/nix-compat/src/wire/bytes/reader/mod.rs +++ b/tvix/nix-compat/src/wire/bytes/reader/mod.rs @@ -109,8 +109,6 @@ where } /// Remaining data length, ie not including data already read. - /// - /// If the size has not been read yet, this is [None]. pub fn len(&self) -> u64 { match self.state { State::Body {