You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0382]: borrow of moved value: `jj`
--> src\main.rs:33:5
|
28 | let mut jj = Job::new_repeated(Duration::from_secs(8), |_uuid, _l| {
| ------ move occurs because `jj` has type `Job`, which does not implement the `Copy` trait
...
31 | sched.add(jj);
| -- value moved here
32 |
33 | / jj.on_start_notification_add(Box::new(|job_id, notification_id, type_of_notification| {
34 | | Box::pin(async move {
35 | | println!("Job {:?} was started, notification {:?} ran ({:?})", job_id, notification_id, type_of_notification);
36 | | })
37 | | }));
| |_______^ value borrowed here after move
if I jj.clone() that compiles; but it isn't right. I don't need that to work for my purposes, but I wanted to report it and learn something new if there's a solution.
thanks.
--dave
The text was updated successfully, but these errors were encountered:
https://crates.io/crates/tokio-cron-scheduler
I copied and pasted the code from the webpage. When I build I get:
if I jj.clone() that compiles; but it isn't right. I don't need that to work for my purposes, but I wanted to report it and learn something new if there's a solution.
thanks.
--dave
The text was updated successfully, but these errors were encountered: