Incorrect initial suggestion

After a change where I need to take ownership of a value, the compiler suggested I change:

rocket::build().attach(AdHoc::try_on_ignite("Config", |rocket| async {

.. into:

rocket::build().attach(AdHoc::try_on_ignite("Config", move |rocket| async {

.. which causes another error, with the suggested fix:

rocket::build().attach(AdHoc::try_on_ignite("Config", move |rocket| async move {

.. which works, but the first move is superfluous, because:

rocket::build().attach(AdHoc::try_on_ignite("Config", |rocket| async move {

.. works just fine.

I did a few quick Issue searches on GitHub, but couldn't find anything related to this. Is it worth reporting? (I assume once we get proper async closures this won't really matter anyway).

yes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.