Skip to content

Commit 2901f86

Browse files
jordy255190xahzam
authored andcommitted
remove align(16) from some types
1 parent 587bbaf commit 2901f86

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/margin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ use drift_program::{
2222
// Reuses existing type definitions while removing Solana-specific abstractions
2323
use crate::types::MarketState;
2424

25-
#[repr(C, align(16))]
25+
#[repr(C)]
2626
#[derive(Clone, Copy, Debug, Default)]
2727
pub struct IsolatedMarginCalculation {
28-
pub market_index: u16,
2928
pub margin_requirement: u128,
3029
pub total_collateral: i128,
3130
pub total_collateral_buffer: i128,
3231
pub margin_requirement_plus_buffer: u128,
32+
pub market_index: u16,
3333
}
3434

3535
impl IsolatedMarginCalculation {
@@ -58,7 +58,7 @@ impl IsolatedMarginCalculation {
5858
}
5959

6060
// Core margin calculation result
61-
#[repr(C, align(16))]
61+
#[repr(C)]
6262
#[derive(Debug, Clone)]
6363
pub struct SimplifiedMarginCalculation {
6464
pub total_collateral: i128,

src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ pub struct MarginCalculation {
104104
#[repr(C)]
105105
#[derive(Copy, Clone, Debug, Default)]
106106
pub struct IsolatedMarginCalculation {
107-
pub market_index: u16,
108107
pub margin_requirement: compat::u128,
109108
pub total_collateral: compat::i128,
110109
pub total_collateral_buffer: compat::i128,
111110
pub margin_requirement_plus_buffer: compat::u128,
111+
pub market_index: u16,
112112
}
113113

114114
impl MarginCalculation {

0 commit comments

Comments
 (0)