You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use im::hashset::HashSetasImHashSet;#[derive(Arbitrary,Clone)]structExampleHashSet{my_set:ImHashSet<u32>,}use im::hashmap::HashMapasImHashMap;#[derive(Arbitrary,Clone)]structExampleHashMap{my_map:ImHashMap<u32,u64>,}
The first part (ExampleHashSet) compiles, but the second one (ExampleHashMap) does not. The second example fails with the following compilation error:
$ cargo test -p offst-proto
Compiling offst-proto v0.1.0(...)error[E0277]: the trait bound `im::hash::map::HashMap<u32,u64>: quickcheck::arbitrary::Arbitrary` is not satisfied
--> components/proto/src/funder/messages.rs:858:14
|
858 | #[derive(Arbitrary,Clone)]
| ^^^^^^^^^ the trait `quickcheck::arbitrary::Arbitrary` is not implemented for `im::hash::map::HashMap<u32,u64>`
|
= note: required by `quickcheck::arbitrary::Arbitrary::arbitrary`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.error: could not compile `offst-proto`.warning: build failed, waiting for other jobs to finish...
error: build failed
This is the relevant line I have in my Cargo.toml:
im = {version = "14.1.0", features = ["serde", "quickcheck"]}
I am on the stable channel, this is the version of my rustc:
rustc 1.40.0 (73528e339 2019-12-16)
Guess for solution
I have seen this chunk of code at src/hash/map.rs:
Hi, thank you for your work on
im-rs
!I am trying to compile the following code:
The first part (ExampleHashSet) compiles, but the second one (ExampleHashMap) does not. The second example fails with the following compilation error:
This is the relevant line I have in my Cargo.toml:
I am on the stable channel, this is the version of my rustc:
Guess for solution
I have seen this chunk of code at
src/hash/map.rs
:It has the "feature = "arc". I am not sure what this feature is, and how to opt into it.
I did notice that it does not exist at
src/hash/set.rs
:The text was updated successfully, but these errors were encountered: