From b38b716e6614349d5783df9e4b77e67a5266c85d Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:45:28 -0700 Subject: [PATCH] Add some basic U256 and I256 doc comments --- soroban-sdk/src/num.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/soroban-sdk/src/num.rs b/soroban-sdk/src/num.rs index 08e07224a..ed1b80f0d 100644 --- a/soroban-sdk/src/num.rs +++ b/soroban-sdk/src/num.rs @@ -10,7 +10,8 @@ use crate::env::internal::xdr::ScVal; use crate::{env::MaybeEnv, unwrap::UnwrapInfallible}; macro_rules! impl_num_wrapping_val_type { - ($wrapper:ident, $val:ty, $small:ty) => { + (#[doc = $doc:expr] $wrapper:ident, $val:ty, $small:ty) => { + #[doc = $doc] #[derive(Clone)] pub struct $wrapper { env: MaybeEnv, @@ -159,5 +160,16 @@ macro_rules! impl_num_wrapping_val_type { }; } -impl_num_wrapping_val_type!(U256, U256Val, U256Small); -impl_num_wrapping_val_type!(I256, I256Val, I256Small); +impl_num_wrapping_val_type!( + /// U256 holds a 256-bit unsigned integer. + U256, + U256Val, + U256Small +); + +impl_num_wrapping_val_type!( + /// I256 holds a 256-bit signed integer. + I256, + I256Val, + I256Small +);