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 Default. On Apr 9, 2014 11:25 AM, "Tommi Tissari" <[email protected]> wrote: > > On 09 Apr 2014, at 20:46, Kevin Ballard <[email protected]> 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 > [email protected] > https://mail.mozilla.org/listinfo/rust-dev >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
