MCPcopy Index your code
hub / github.com/emwalker/digraph / load

Method load

backend/src/config.rs:15–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14impl Config {
15 pub fn load() -> Result<Self> {
16 let profile = if cfg!(debug_assertions) {
17 "development"
18 } else {
19 "production"
20 };
21
22 let filename = format!(".env.{profile}.local");
23 if Path::new(&filename).exists() {
24 dotenv::from_filename(filename).ok();
25 }
26 dotenv::dotenv().ok();
27 Ok(envy::from_env::<Self>()?)
28 }
29}

Callers

nothing calls this directly

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected