From e0baa2656701d16b18e4d1b73fa2179437197c92 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 19 Jun 2022 18:22:20 +0200 Subject: Remove "global" example This patch removes the "global" example. To be honest, I am too lazy right now to update the example for the removed (because deprecated) interfaces. Shame on me. If someone wants to provide this example again, I'm happy to see this patch reverted and the example adapted. ;-) Signed-off-by: Matthias Beyer --- examples/global/main.rs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 examples/global/main.rs diff --git a/examples/global/main.rs b/examples/global/main.rs deleted file mode 100644 index 160d881..0000000 --- a/examples/global/main.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![allow(deprecated)] -use config::Config; -use lazy_static::lazy_static; -use std::error::Error; -use std::sync::RwLock; - -lazy_static! { - static ref SETTINGS: RwLock = RwLock::new(Config::default()); -} - -fn try_main() -> Result<(), Box> { - // Set property - SETTINGS.write()?.set("property", 42)?; - - // Get property - println!("property: {}", SETTINGS.read()?.get::("property")?); - - Ok(()) -} - -fn main() { - try_main().unwrap(); -} -- cgit v1.2.3