dancing_carrot
dancing_carrot

Reputation: 45

How do you implement the trait TypeInfo for H256?

Compilation gives this error:

error[E0277]: the trait bound H256: TypeInfo is not satisfied the trait TypeInfo is not implemented for H256

enter image description here

I tried implement derive TypeInfo in Primitives/core/src/hasher.rs, but this did not work.

enter image description here

How do I solve this error please?

GitHub Repo: Can supply if required...

rustup show:

enter image description here

Command used: cargo build --release

cargo tree -d output: Can supply if required...

Upvotes: 0

Views: 681

Answers (1)

gui
gui

Reputation: 516

The crate primitive-types provide the feature scale-info, when compiled with this feature the crate will implement TypeInfo on the primitive types such as H256

Upvotes: 4

Related Questions