Skip to content

Simulator features combined with multithreaded doesn't compile #103

Closed
@sdmg15

Description

@sdmg15

Hello,

Here is the error I get when combining simulator and multithreaded features

I have this inside my Cargo.toml

bitbox-api = {version = "0.7.0", features = ["multithreaded", "tokio", "simulator"]}

When compiling

error[E0053]: method `read` has an incompatible type for trait
  --> /home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitbox-api-0.6.0/src/simulator.rs:45:1
   |
45 | #[async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^ expected trait `std::future::Future<Output = Result<Vec<u8>, communication::Error>> + Send`, found trait `std::future::Future<Output = Result<Vec<u8>, communication::Error>>`
   |
note: type in trait
  --> /home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitbox-api-0.6.0/src/communication.rs:30:5
   |
30 |     async fn read(&self) -> Result<Vec<u8>, Error>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: expected signature `fn(&'life0 TcpClient) -> Pin<Box<(dyn std::future::Future<Output = Result<Vec<u8>, communication::Error>> + Send + 'async_trait)>>`
              found signature `fn(&'life0 TcpClient) -> Pin<Box<(dyn std::future::Future<Output = Result<Vec<u8>, communication::Error>> + 'async_trait)>>`

On version 0.6.0 the simulator seems not to be working reporting the same previous error.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions