blackbeam / mysql_async

Asyncronous Rust Mysql driver based on Tokio.
Apache License 2.0
372 stars 113 forks source link

Example does not compile #275

Open mabushey opened 6 months ago

mabushey commented 6 months ago

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!