modelfoxdotdev / modelfox

ModelFox makes it easy to train, deploy, and monitor machine learning models.
Other
1.46k stars 63 forks source link

Fix build errors #119

Closed joelchen closed 2 years ago

joelchen commented 2 years ago

Fix the following errors:

error[E0599]: no method named `send` found for reference `&StubTransport` in the current scope
   --> crates/app/core/lib.rs:120:15
    |
120 |                 transport.send(email).await?;
    |                           ^^^^ method not found in `&StubTransport`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   | use lettre::Transport;
    |
error[E0308]: mismatched types
   --> crates/app/core/lib.rs:121:20
    |
121 |                 transport.send(email).await?;
    |                                ^^^^^
    |                                |
    |                                expected `&Message`, found struct `Message`
    |                                help: consider borrowing here: `&email`
error[E0277]: `Result<(), lettre::transport::stub::Error>` is not a future
   --> crates/app/core/lib.rs:121:26
    |
121 |                 transport.send(email).await?;
    |                                      ^^^^^^ `Result<(), lettre::transport::stub::Error>` is not a future
    |
    = help: the trait `futures::Future` is not implemented for `Result<(), lettre::transport::stub::Error>`
    = note: Result<(), lettre::transport::stub::Error> must be a future or must implement `IntoFuture` to be awaited
    = note: required because of the requirements on the impl of `std::future::IntoFuture` for `Result<(), lettre::transport::stub::Error>`
help: remove the `.await`
    |
121 -                 transport.send(email).await?;
121 +                 transport.send(email)?;
    |
isabella commented 2 years ago

Thanks @joelchen!