servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
458 stars 102 forks source link

Why custom Zero/One traits is used? #406

Closed Mingun closed 4 years ago

Mingun commented 4 years ago

num_traits crate already contains that traits and num_traits::Zero even used in codebase. Why own traits is needed? May be remove them?

nical commented 4 years ago

I think that euclid's Zero and One traits predate the num_trait crate. We should be able to use num_traits now.

Mingun commented 4 years ago

I think I found reason. Custom traits have lower requirements to traits, that should be implemented by the type. Question -- do we really need your own types with relaxed requirements

nical commented 4 years ago

I think it would make sense to just move to num_traits with the next wave of breaking changes.