Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 95cd64c

Browse files
authored
token-swap: Making Arc struct as Sync (#2896)
* box changed to arc * Imported Arc in all files * warnings removed * Updated fuzz * Removed useless Arc
1 parent 1b369e1 commit 95cd64c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

token-swap/program/src/curve/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub struct SwapCurve {
6262
pub curve_type: CurveType,
6363
/// The actual calculator, represented as a trait object to allow for many
6464
/// different types of curves
65-
pub calculator: Arc<dyn CurveCalculator>,
65+
pub calculator: Arc<dyn CurveCalculator + Sync + Send>,
6666
}
6767

6868
impl SwapCurve {

token-swap/program/src/processor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5374,7 +5374,7 @@ mod tests {
53745374
fn check_valid_swap_curve(
53755375
fees: Fees,
53765376
curve_type: CurveType,
5377-
calculator: Arc<dyn CurveCalculator>,
5377+
calculator: Arc<dyn CurveCalculator + Send + Sync>,
53785378
token_a_amount: u64,
53795379
token_b_amount: u64,
53805380
) {

0 commit comments

Comments
 (0)