diff --git a/src/orders.rs b/src/orders.rs index 12c516a..61a44a2 100644 --- a/src/orders.rs +++ b/src/orders.rs @@ -818,7 +818,7 @@ impl super::Client { "value": {unit} }} "#, - reference_id = unit.reference_id.clone().unwrap_or(String::from("default")), + reference_id = unit.reference_id.clone().unwrap_or_else(|| String::from("default")), unit = unit_str); if i < p_units.len() - 1 {