Skip to content

Commit

Permalink
Add some basic U256 and I256 doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Jun 23, 2023
1 parent c20b456 commit b38b716
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions soroban-sdk/src/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
);

0 comments on commit b38b716

Please sign in to comment.