diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2022-06-19 18:22:20 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2022-11-28 17:29:14 +0100 |
commit | e0baa2656701d16b18e4d1b73fa2179437197c92 (patch) | |
tree | d23666cb8b541f78034c2629bd637e70d32e5b4a | |
parent | 1c208199ba9f9608d56a9882957a767d9ca4fa05 (diff) |
Remove "global" exampleremove-deprecated
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 <mail@beyermatthias.de>
-rw-r--r-- | examples/global/main.rs | 23 |
1 files changed, 0 insertions, 23 deletions
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<Config> = RwLock::new(Config::default()); -} - -fn try_main() -> Result<(), Box<dyn Error>> { - // Set property - SETTINGS.write()?.set("property", 42)?; - - // Get property - println!("property: {}", SETTINGS.read()?.get::<i32>("property")?); - - Ok(()) -} - -fn main() { - try_main().unwrap(); -} |