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

@@ -16,7 +16,7 @@ pub trait StrategyEncoder {
///
/// # Returns
/// * `Result<EncodedSwaps, EncodingError>`
fn encode_strategy(&self, solution: Solution) -> Result<EncodedSolution, EncodingError>;
fn encode_strategy(&self, solution: &Solution) -> Result<EncodedSolution, EncodingError>;
/// Retrieves the swap encoder for a specific protocol system.
///