rust-num / num-complex

Complex numbers for Rust
Apache License 2.0
232 stars 50 forks source link

Implement std::iter::{Sum, Product} #11

Closed termoshtt closed 6 years ago

termoshtt commented 6 years ago

Resolve #3

Num and NumAssign are used for type constraint.

termoshtt commented 6 years ago
error: no associated item named `new` found for type `std::collections::hash_map::DefaultHasher` in the current scope
    --> src/lib.rs:1162:22
     |
1162 |     let mut hasher = <RandomState as BuildHasher>::Hasher::new();
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I met this error with 1.12.0. I will use 1.14.0 like #7

cuviper commented 6 years ago

Thanks - I'll need to hold this PR until I'm ready to make breaking changes.

termoshtt commented 6 years ago

I see the num-complex 0.2 milestone, where these two issues are listed. Is there another issue to be included in num-complex 0.2 ?

cuviper commented 6 years ago

Maybe also #6 for no_std, after rust-num/num-traits#16.

termoshtt commented 6 years ago

I guess the no_std feature of num-traits will take a long time... IMHO, we bump up version to 0.2 with the current two issues, and postpone the no_std feature to 0.3. What do you think about it?

cuviper commented 6 years ago

I'd rather work it out and bump only once in a long while.

cuviper commented 6 years ago

Rebased, then I made it use folds instead. Thanks for the PR!

bors r+

bors[bot] commented 6 years ago

Build succeeded