style(amm): cargo fmt

This commit is contained in:
Andrea Franz
2026-07-23 14:18:33 +02:00
parent 8ef8ec7468
commit f844d975b0
3 changed files with 6 additions and 5 deletions
+4 -1
View File
@@ -73,7 +73,10 @@ pub unsafe extern "C" fn amm_client_swap_words(
min_out: *const [u8; 16],
deadline: u64,
) -> AmmWords {
let (a, m) = (u128::from_le_bytes(*amount_in), u128::from_le_bytes(*min_out));
let (a, m) = (
u128::from_le_bytes(*amount_in),
u128::from_le_bytes(*min_out),
);
match swap::swap_exact_input_words(a, m, deadline) {
Ok(w) => {
let boxed = w.into_boxed_slice();
+1 -2
View File
@@ -33,8 +33,7 @@ pub fn current_tick_pda(twap: ProgramId, pool: AccountId) -> AccountId {
#[cfg(test)]
mod tests {
use amm_core::compute_pool_pda;
use nssa_core::account::AccountId;
use nssa_core::program::ProgramId;
use nssa_core::{account::AccountId, program::ProgramId};
use super::*;
+1 -2
View File
@@ -27,8 +27,7 @@ pub fn decode_pool(bytes: &[u8]) -> Result<PoolView, String> {
reserve_a: p.reserve_a,
reserve_b: p.reserve_b,
liquidity_supply: p.liquidity_pool_supply,
fees: u32::try_from(p.fees)
.map_err(|_| format!("pool fee {} exceeds u32::MAX", p.fees))?,
fees: u32::try_from(p.fees).map_err(|_| format!("pool fee {} exceeds u32::MAX", p.fees))?,
})
}