fix: Constrain new in SwapEncoder so it does not apply to trait objects

This commit is contained in:
Diana Carvalho
2025-01-16 17:16:52 +00:00
parent 30f2ac9f6b
commit e93bf11a85

View File

@@ -7,7 +7,9 @@ use anyhow::Error;
use std::str::FromStr;
pub trait SwapEncoder: Sync + Send {
fn new(executor_address: Address) -> Self;
fn new(executor_address: Address) -> Self
where
Self: Sized;
fn encode_swap(&self, swap: Swap, encoding_context: EncodingContext) -> Result<Vec<u8>, Error>;
fn executor_address(&self) -> Address;
}