-
-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
Hello!
I'm trying to update my code to version 0.5 but I'm having issues using anyhow.
I managed to reproduce it using the code in the examples. Just modifying the send_email signature:
pub async fn send_email(job: Email) -> anyhow::Result<()> {
log::info!("Attempting to send email to {}", job.to);
Ok(())
}
Outputs the following when building the actix-web example:
error[E0277]: the trait bound `ServiceFn<fn(Email) -> impl futures::Future<Output = Result<(), anyhow::Error>> {send_email}, _>: tower_service::Service<apalis::prelude::Request<_>>` is not satisfied
--> examples/actix-web/src/main.rs:48:18
|
48 | .build_fn(send_email)
| ^^^^^^^^ the trait `tower_service::Service<apalis::prelude::Request<_>>` is not implemented for `ServiceFn<fn(Email) -> impl futures::Future<Output = Result<(), anyhow::Error>> {s
end_email}, _>`
I'm not sure if this is still possible to do or I'm missing something. In any case thanks a lot for the efforts in building this library!!
Metadata
Metadata
Assignees
Labels
No labels