Skip to content

Commit eda78a7

Browse files
toshokanmehcode
authored andcommitted
Fix infinite compile loop regression from recursive Lazy reference
1 parent 5d9c292 commit eda78a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlx-macros/src/query/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct Metadata {
3737
static METADATA: Lazy<Metadata> = Lazy::new(|| {
3838
use std::env;
3939

40-
let manifest_dir = env::var("CARGO_MANIFEST_DIR")
40+
let manifest_dir: PathBuf = env::var("CARGO_MANIFEST_DIR")
4141
.expect("`CARGO_MANIFEST_DIR` must be set")
4242
.into();
4343

@@ -47,7 +47,7 @@ static METADATA: Lazy<Metadata> = Lazy::new(|| {
4747

4848
// If a .env file exists at CARGO_MANIFEST_DIR, load environment variables from this,
4949
// otherwise fallback to default dotenv behaviour.
50-
let env_path = METADATA.manifest_dir.join(".env");
50+
let env_path = manifest_dir.join(".env");
5151
if env_path.exists() {
5252
let res = dotenv::from_path(&env_path);
5353
if let Err(e) = res {

0 commit comments

Comments
 (0)