From 930bd7ad340dc61057cd1db1db9d1389aae569a5 Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 10 Sep 2025 12:11:01 -0400 Subject: More extensive example --- examples/simple.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 examples/simple.rs (limited to 'examples/simple.rs') diff --git a/examples/simple.rs b/examples/simple.rs deleted file mode 100644 index 72ccf1f..0000000 --- a/examples/simple.rs +++ /dev/null @@ -1,29 +0,0 @@ -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 {}", - conf.get_or_default("indentation-type", "tabs") - ); - println!( - "show line numbers: {}", - conf.get_bool_or_default("show-line-numbers", false)? - ); - println!( - "edit-over-ssh plug-in path: {:?}", - conf.get("plug-in.edit-over-ssh.path") - ); - println!("C++ extensions: {:?}", conf.get_list("file-extensions.Cpp")); - Ok(()) -} - -fn main() -> ExitCode { - if let Err(e) = try_main() { - eprintln!("Error: {e}"); - return ExitCode::FAILURE; - } - ExitCode::SUCCESS -} -- cgit v1.2.3