use pom_parser::Configuration; use std::process::ExitCode; fn try_main() -> Result<(), Box> { let conf = Configuration::load_path("examples/conf.pom")?; println!("tab width is {}", conf.get_int_or_default("tab-size", 8)?); println!( "indenting with {}", if conf.get_bool_or_default("indent-using-spaces", false)? { "spaces" } else { "tabs" } ); println!( "edit-over-ssh plug-in path: {:?}", conf.get("plug-in.edit-over-ssh.path") ); Ok(()) } fn main() -> ExitCode { if let Err(e) = try_main() { eprintln!("Error: {e}"); return ExitCode::FAILURE; } ExitCode::SUCCESS }