Skip to content

Example does not compile #275

@mabushey

Description

@mabushey

I'm an absolute noob regarding tokio/async.

cargo build
   Compiling mysql_test v0.1.0 (/home/michael/rust/mysql_test)
error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied
  --> src/main.rs:11:20
   |
11 | async fn main() -> Result<()> {
   |                    ^^^^^^ -- supplied 1 generic argument
   |                    |
   |                    expected 2 generic arguments
   |
help: add missing generic argument
   |
11 | async fn main() -> Result<(), E> {
   |                             +++

For more information about this error, try `rustc --explain E0107`.
error: could not compile `mysql_test` (bin "mysql_test") due to previous error

I suspect most experienced Rust developers could figure this out in a few seconds. It would be good to have a working example.

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions