fix: Remove unnecessary clones from encoding

Use references if possible

Took 3 minutes
This commit is contained in:
Diana Carvalho
2025-06-23 12:54:09 +01:00
parent ce8e9faf32
commit e704151404
11 changed files with 185 additions and 197 deletions

View File

@@ -34,8 +34,8 @@ pub trait SwapEncoder: Sync + Send {
/// The encoded swap data as bytes, directly executable on the executor contract
fn encode_swap(
&self,
swap: Swap,
encoding_context: EncodingContext,
swap: &Swap,
encoding_context: &EncodingContext,
) -> Result<Vec<u8>, EncodingError>;
/// Returns the address of the protocol-specific executor contract.