Type inference seems to fail for some reason, but only on windows on the CI or when cross-compiling. On an actual windows machine it builds fine.
error[E0283]: type annotations needed
--> lib\src\blob\tests.rs:72:37
|
72 | let orig_content: Vec<u8> = rng.sample_iter(Standard).take(blob_len).collect();
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the method `sample_iter`
|
= note: cannot satisfy `ouisync_rand::distributions::Standard: ouisync_rand::prelude::Distribution<_>`
note: required by a bound in `ouisync_rand::Rng::sample_iter`
--> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\rand-0.8.5\src\rng.rs:194:12
|
192 | fn sample_iter<T, D>(self, distr: D) -> distributions::DistIter<D, Self, T>
| ----------- required by a bound in this associated function
193 | where
194 | D: Distribution<T>,
| ^^^^^^^^^^^^^^^ required by this bound in `Rng::sample_iter`
help: consider specifying the generic arguments
|
72 | let orig_content: Vec<u8> = rng.sample_iter::<T, ouisync_rand::distributions::Standard>(Standard).take(blob_len).collect();
| ++++++++++++++++++++++++++++++++++++++++++++
Type inference seems to fail for some reason, but only on windows on the CI or when cross-compiling. On an actual windows machine it builds fine.