[rust-dev] impl num::Zero and std::ops::Add error
ecreed at cs.washington.edu
Wed Apr 9 11:37:33 PDT 2014
If you implement Add on a type, then you should implement Zero to specify
the identity of the + operation on that type.
If you simply want to specify a default value, then you should implement
On Apr 9, 2014 11:25 AM, "Tommi Tissari" <rusty.gates at icloud.com> wrote:
> > On 09 Apr 2014, at 20:46, Kevin Ballard <kevin at sb.org> wrote:
> > For reference, the Zero trait lives in std::num, which should be a good
> indication that this is a property of numeric types.
> Am I not supposed to use std::num::Zero for defining things like zero
> vector or zero matrix? Those are neither numbers nor zeroes.
> Rust-dev mailing list
> Rust-dev at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev