MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / parse_firedbg_config

Function parse_firedbg_config

command/src/main.rs:433–449  ·  view source on GitHub ↗
(workspace: &Workspace)

Source from the content-addressed store, hash-verified

431}
432
433fn parse_firedbg_config(workspace: &Workspace) -> Result<cfg::Config> {
434 let workspace_root_dir = &workspace.root_dir;
435 let config_file_path = &format!("{workspace_root_dir}/firedbg.toml");
436 let config_file_path = Path::new(config_file_path);
437 let config = if config_file_path.exists() && config_file_path.is_file() {
438 let config_file_content = fs::read_to_string(&config_file_path).context("Fail to read")?;
439 toml::from_str(&config_file_content).context("Fail to parse TOML")?
440 } else {
441 console::warn(
442 "Tracing",
443 "`firedbg.toml` config file not found, default settings will be applied",
444 );
445 cfg::Config::default()
446 };
447 log::info!("firedbg_config\n{:#?}", config);
448 Ok(config)
449}
450
451fn parse_trace_config<'a>(
452 config: &'a cfg::Config,

Callers 1

mainFunction · 0.85

Calls 1

warnFunction · 0.85

Tested by

no test coverage detected