From 9cd60c536e8c73ec2125eef8b899b21dbaef6265 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Tue, 24 Oct 2023 12:38:31 -0600 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Daira Emma Hopwood --- zcash_primitives/src/transaction/components/amount.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zcash_primitives/src/transaction/components/amount.rs b/zcash_primitives/src/transaction/components/amount.rs index 8c4d6fc641..d09cc1fa09 100644 --- a/zcash_primitives/src/transaction/components/amount.rs +++ b/zcash_primitives/src/transaction/components/amount.rs @@ -282,7 +282,8 @@ impl NonNegativeAmount { Self::from_u64(amount) } - /// Reads a NonNegativeAmount from a signed 64-bit little-endian integer. + /// Reads a NonNegativeAmount from a signed integer represented as a two's + /// complement 64-bit little-endian value. /// /// Returns an error if the amount is outside the range `{0..MAX_MONEY}`. pub fn from_nonnegative_i64_le_bytes(bytes: [u8; 8]) -> Result { @@ -290,7 +291,8 @@ impl NonNegativeAmount { Self::from_nonnegative_i64(amount) } - /// Returns this NonNegativeAmount encoded as a signed 64-bit little-endian integer. + /// Returns this NonNegativeAmount encoded as a signed two's complement 64-bit + /// little-endian value. pub fn to_i64_le_bytes(self) -> [u8; 8] { self.0.to_i64_le_bytes() }