Closed Swivelgames closed 1 year ago
Interestingly enough, if I move the Lazy<String>
into main.rs
, the warning goes away.
Figured out the problem. With the project I'm working on, I have both a lib.rs
and a main.rs
. The main.rs
is using the DB_CREDENTIALS
, but the lib.rs
isn't (as designed).
The solution was to move DB_CREDENTIALS
into main.rs
, since lib.rs
doesn't use it :sweat_smile:
Using
once_cell::sync::Lazy
and getting some funky results when I try to doLazy<String>
inside of anasync main
main.rs:
common.rs:
The error thrown is:
Otherwise, I get the following:
However,
common::PORT
doesn't have the same problem.