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
Running into the following error when I try to compile my program which imports the jmt = 0.10.0 crate. How can I get around this? I implement a wrapper KeccakHasher around alloy_primitives::Keccak for which I implement the SimpleHasher trait.
my_program:dev: error[E0277]: `T` cannot be sent between threads safely
my_program:dev: --> /Users/mw2000/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jmt-0.10.0/src/lib.rs:327:34
my_program:dev: |
my_program:dev: 327 | impl<T: Digest> SimpleHasher for T
my_program:dev: | ^ `T` cannot be sent between threads safely
my_program:dev: |
my_program:dev: note: required by a bound in `SimpleHasher`
my_program:dev: --> /Users/mw2000/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jmt-0.10.0/src/lib.rs:312:40
my_program:dev: |
my_program:dev: 312 | pub trait SimpleHasher: Sized + Sync + Send {
my_program:dev: | ^^^^ required by this bound in `SimpleHasher`
my_program:dev: help: consider further restricting this bound
my_program:dev: |
my_program:dev: 327 | impl<T: Digest + core::marker::Send> SimpleHasher for T
my_program:dev: | ++++++++++++++++++++
my_program:dev:
my_program:dev: error[E0277]: `T` cannot be shared between threads safely
my_program:dev: --> /Users/mw2000/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jmt-0.10.0/src/lib.rs:327:34
my_program:dev: |
my_program:dev: 327 | impl<T: Digest> SimpleHasher for T
my_program:dev: | ^ `T` cannot be shared between threads safely
my_program:dev: |
my_program:dev: note: required by a bound in `SimpleHasher`
my_program:dev: --> /Users/mw2000/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jmt-0.10.0/src/lib.rs:312:33
my_program:dev: |
my_program:dev: 312 | pub trait SimpleHasher: Sized + Sync + Send {
my_program:dev: | ^^^^ required by this bound in `SimpleHasher`
my_program:dev: help: consider further restricting this bound
my_program:dev: |
my_program:dev: 327 | impl<T: Digest + core::marker::Sync> SimpleHasher for T
The text was updated successfully, but these errors were encountered:
mw2000
changed the title
Error while compiling jmt crate.
Thread safety error while compiling jmt crate
Nov 3, 2024
Running into the following error when I try to compile my program which imports the
jmt = 0.10.0
crate. How can I get around this? I implement a wrapperKeccakHasher
aroundalloy_primitives::Keccak
for which I implement theSimpleHasher
trait.The text was updated successfully, but these errors were encountered: