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
What is the advantage of the recommended code over the original code
It avoids errors like the following:
Io(Custom { kind: Other, error: "reactor gone" })
const creates a new copy of the runtime every time it's used, while static uses the same runtime each time.
I was using this as RUNTIME.block_on(), which takes &mut, so possibly this could be expanded to any &mut use of a const.
What it does
What does this lint do?
It errors on
const
tokio runtimes.Categories (optional)
What is the advantage of the recommended code over the original code
It avoids errors like the following:
const
creates a new copy of the runtime every time it's used, whilestatic
uses the same runtime each time.I was using this as
RUNTIME.block_on()
, which takes&mut
, so possibly this could be expanded to any&mut
use of aconst
.Drawbacks
None.
Example
should instead be
The text was updated successfully, but these errors were encountered: