MCPcopy Create free account
hub / github.com/acking-you/static_flow / parse_bool_env

Function parse_bool_env

crates/backend/src/memory_profiler.rs:845–852  ·  view source on GitHub ↗
(key: &str, default_value: bool)

Source from the content-addressed store, hash-verified

843}
844
845fn parse_bool_env(key: &str, default_value: bool) -> bool {
846 env::var(key)
847 .ok()
848 .map(|value| {
849 matches!(value.trim().to_ascii_lowercase().as_str(), "1" | "true" | "yes" | "on")
850 })
851 .unwrap_or(default_value)
852}
853
854fn read_process_memory() -> (u64, u64) {
855 if let Some(stats) = memory_stats::memory_stats() {

Callers 1

from_envMethod · 0.70

Calls 1

okMethod · 0.80

Tested by

no test coverage detected