diff options
-rw-r--r-- | tvix/nix-compat/src/wire/bytes/reader.rs | 1 | ||||
-rw-r--r-- | tvix/nix-compat/src/wire/bytes/writer.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tvix/nix-compat/src/wire/bytes/reader.rs b/tvix/nix-compat/src/wire/bytes/reader.rs index 4c450b55db1a..c36729c6142b 100644 --- a/tvix/nix-compat/src/wire/bytes/reader.rs +++ b/tvix/nix-compat/src/wire/bytes/reader.rs @@ -60,6 +60,7 @@ where } } /// Returns an error if the passed usize is 0. +#[inline] fn ensure_nonzero_bytes_read(bytes_read: usize) -> Result<usize, std::io::Error> { if bytes_read == 0 { Err(std::io::Error::new( diff --git a/tvix/nix-compat/src/wire/bytes/writer.rs b/tvix/nix-compat/src/wire/bytes/writer.rs index f278b8335f8f..347934b3dc8f 100644 --- a/tvix/nix-compat/src/wire/bytes/writer.rs +++ b/tvix/nix-compat/src/wire/bytes/writer.rs @@ -56,6 +56,7 @@ where } /// Returns an error if the passed usize is 0. +#[inline] fn ensure_nonzero_bytes_written(bytes_written: usize) -> Result<usize, std::io::Error> { if bytes_written == 0 { Err(std::io::Error::new( |