Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Conversation

@fransklaver
Copy link

Hyper 0.14 is pretty old. Update to hyper 1.6.

Make consistent formatting using rustfmt.
Move the &mut to the type.

    error[E0308]: mismatched types
      --> tests/test_serial.rs:11:31
       |
    11 | async fn test_get_respond_200(&mut ctx: PortContext) {
       |                               ^^^^^^^^
       |                               |
       |                               expected `PortContext`, found `&mut _`
       |                               this expression has type `PortContext`
       |                               help: to declare a mutable variable use: `mut ctx`
       |
       = note:         expected struct `PortContext`
               found mutable reference `&mut _`
We're calling an async function, but aren't awaiting it. Let's do that.

    warning: non-binding `let` on a future
      --> tests/test_serial.rs:62:9
       |
    62 |         let _ = self.http_context.teardown();
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider awaiting the future or dropping explicitly with `std::mem::drop`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future
       = note: `#[warn(clippy::let_underscore_future)]` on by default
This removes the need for async_trait.
hyper 0.14 is pretty old by now. Update to version 1.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant