servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
462 stars 103 forks source link

Unresolved Import `num_traits::Euclid` #500

Closed ctiedt closed 1 year ago

ctiedt commented 1 year ago

This crate does not compile for me with the following error message:

error[E0432]: unresolved import `num_traits::Euclid`
  --> C:\Users\clemens\.cargo\registry\src\index.crates.io-6f17d22bba15001f\euclid-0.22.8\src\point.rs:26:34
   |
26 | use num_traits::{Float, NumCast, Euclid};
   |                                  ^^^^^^ no `Euclid` in the root

In src/point.rs there is an import for num_traits::Euclid, but this crate depends on num_traits version 0.2.10 which does not contain this trait (see the 0.2.10 documentation). As far as I can tell, the Euclid trait only exists in version 0.2.15.

Updating to a newer version of num_traits should fix this issue.

ArtHome12 commented 1 year ago

My bad. I will make PR soon

ArtHome12 commented 1 year ago

@ctiedt Are you building Euclid with specific features? If so, please tell me, I will try to test such a situation in the future.

ctiedt commented 1 year ago

@ctiedt Are you building Euclid with specific features? If so, please tell me, I will try to test such a situation in the future.

I am not using euclid directly, one of my other dependencies (slint, or one of its dependencies) is using euclid. As far I can tell, they build euclid without default features.

But with your PR merged, my build seems to work again, so thanks for the quick response!