paritytech / trie

Base-16 Modified Patricia Merkle Tree (aka Trie)
Apache License 2.0
251 stars 67 forks source link

HashDb trait should not imply Send and Sync #214

Closed ufoscout closed 3 months ago

ufoscout commented 5 months ago

The HashDB trait mandates its implementors to be Send and Sync. However, since removing this constraint doesn't affect the remaining code, I'm curious if there's a particular reason for retaining it. I'm particularly interested in this because I need to implement the HashDB trait for a structure within a single-threaded wasm runtime that isn't Send or Sync.

cheme commented 3 months ago

Yes I think there is no real need to be send sync at trait level.