We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d9c292 commit eda78a7Copy full SHA for eda78a7
sqlx-macros/src/query/mod.rs
@@ -37,7 +37,7 @@ struct Metadata {
37
static METADATA: Lazy<Metadata> = Lazy::new(|| {
38
use std::env;
39
40
- let manifest_dir = env::var("CARGO_MANIFEST_DIR")
+ let manifest_dir: PathBuf = env::var("CARGO_MANIFEST_DIR")
41
.expect("`CARGO_MANIFEST_DIR` must be set")
42
.into();
43
@@ -47,7 +47,7 @@ static METADATA: Lazy<Metadata> = Lazy::new(|| {
47
48
// If a .env file exists at CARGO_MANIFEST_DIR, load environment variables from this,
49
// otherwise fallback to default dotenv behaviour.
50
- let env_path = METADATA.manifest_dir.join(".env");
+ let env_path = manifest_dir.join(".env");
51
if env_path.exists() {
52
let res = dotenv::from_path(&env_path);
53
if let Err(e) = res {
0 commit comments