fn validate_supply(&self, token_a_amount: u64, token_b_amount: u64) -> Result<(), SwapError> {
        if token_a_amount == 0 {
            return Err(SwapError::EmptySupply);
        }
        if token_b_amount == 0 {
            return Err(SwapError::EmptySupply);
        }
        Ok(())
    }
/// Validate the given supply on init, helpful for curves that do or don't
/// allow zero supply on one side
Validate the given supply on init, helpful for curves that do or don't
allow zero supply on one side
Validate the given supply on init helpful for curves that do or don ' t allow zero supply on one side
fn validate_supply(&self, token_a_amount: u64, token_b_amount: u64) -> Result<(), SwapError> {
        if token_a_amount == 0 {
            return Err(SwapError::EmptySupply);
        }
        if token_b_amount == 0 {
            return Err(SwapError::EmptySupply);
        }
        Ok(())
    }
fn validate_supply ( & self , token_a_amount : u64 , token_b_amount : u64 ) -> Result < ( ) , SwapError > { if token_a_amount == 0 { return Err ( SwapError :: EmptySupply ) ; } if token_b_amount == 0 { return Err ( SwapError :: EmptySupply ) ; } Ok ( ( ) ) }
Validate the given supply on init, helpful for curves that do or don't
allow zero supply on one side
Validate the given supply on init helpful for curves that do or don ' t allow zero supply on one side
&self
token_a_amount
u64
token_b_amount
u64
&self
token_a_amount
u64
token_b_amount
u64