rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
719 stars 133 forks source link

Remove the `Copy` trait #284

Open LucaCiucci opened 1 year ago

LucaCiucci commented 1 year ago

This was requested in #245. I just removed the Copy bound from the Real and replaced with Clone in Float. This would be a breaking change.

nsabovic commented 5 months ago

I for one would love that as it would enable quite a bit of use cases for non-copyable types. 👍

LucaCiucci commented 5 months ago

Yeah, I think this would be really useful for working with automatic differentiation or arbitrary precision types. AFAIK currently the only way to use rust-num with these types is using a [patch], but this is not feasible in many scenarios where you would have to patch many crates to make things work.