Some operations (most notably multiplication and division) use clone. However, this is inefficient for types with non-trivial Clone impls, such as BigInt or BigDecimal (from the bigdecimal crate). To be fair, most of the time, people will use Complex<f32> or Complex<f64>, so this isn't a major problem, but sometimes people may want to use Complex<BigInt> (for Gaussian integers) or Complex<BigDecimal> (for arbitrary precision arithmetic).
See also rust-num/num-rational#110. This has the same problems and solutions (e.g. using arithmetic on references).
Some operations (most notably multiplication and division) use
clone. However, this is inefficient for types with non-trivialCloneimpls, such asBigIntorBigDecimal(from the bigdecimal crate). To be fair, most of the time, people will useComplex<f32>orComplex<f64>, so this isn't a major problem, but sometimes people may want to useComplex<BigInt>(for Gaussian integers) orComplex<BigDecimal>(for arbitrary precision arithmetic).See also rust-num/num-rational#110. This has the same problems and solutions (e.g. using arithmetic on references).