From be82af2a474b9c6ac85ec1e001af1704521820e6 Mon Sep 17 00:00:00 2001 From: David Orchard Date: Mon, 2 Aug 2021 23:17:08 -0700 Subject: Rename MapImpl to Map --- examples/async_source/main.rs | 4 ++-- examples/glob/src/main.rs | 14 +++++++------- examples/simple/src/main.rs | 6 +++--- examples/watch/src/main.rs | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'examples') diff --git a/examples/async_source/main.rs b/examples/async_source/main.rs index 5134822..005a473 100644 --- a/examples/async_source/main.rs +++ b/examples/async_source/main.rs @@ -1,6 +1,6 @@ use std::error::Error; -use config::{builder::AsyncState, AsyncSource, ConfigBuilder, ConfigError, FileFormat, MapImpl}; +use config::{builder::AsyncState, AsyncSource, ConfigBuilder, ConfigError, FileFormat, Map}; use async_trait::async_trait; use futures::{select, FutureExt}; @@ -56,7 +56,7 @@ struct HttpSource { #[async_trait] impl AsyncSource for HttpSource { - async fn collect(&self) -> Result, ConfigError> { + async fn collect(&self) -> Result, ConfigError> { reqwest::get(&self.uri) .await .map_err(|e| ConfigError::Foreign(Box::new(e)))? // error conversion is possible from custom AsyncSource impls diff --git a/examples/glob/src/main.rs b/examples/glob/src/main.rs index d429917..002ddd4 100644 --- a/examples/glob/src/main.rs +++ b/examples/glob/src/main.rs @@ -1,5 +1,5 @@ use std::path::Path; -use std::collections::MapImpl; +use std::collections::Map; use config::*; use glob::glob; @@ -14,9 +14,9 @@ fn main() { .merge(File::from(Path::new("conf/05-some.yml"))).unwrap() .merge(File::from(Path::new("conf/99-extra.json"))).unwrap(); - // Print out our settings (as a MapImpl) + // Print out our settings (as a Map) println!("\n{:?} \n\n-----------", - settings.try_into::>().unwrap()); + settings.try_into::>().unwrap()); // Option 2 // -------- @@ -28,9 +28,9 @@ fn main() { File::from(Path::new("conf/99-extra.json"))]) .unwrap(); - // Print out our settings (as a MapImpl) + // Print out our settings (as a Map) println!("\n{:?} \n\n-----------", - settings.try_into::>().unwrap()); + settings.try_into::>().unwrap()); // Option 3 // -------- @@ -43,7 +43,7 @@ fn main() { .collect::>()) .unwrap(); - // Print out our settings (as a MapImpl) + // Print out our settings (as a Map) println!("\n{:?} \n\n-----------", - settings.try_into::>().unwrap()); + settings.try_into::>().unwrap()); } diff --git a/examples/simple/src/main.rs b/examples/simple/src/main.rs index 5d4c3bc..e07eff2 100644 --- a/examples/simple/src/main.rs +++ b/examples/simple/src/main.rs @@ -1,4 +1,4 @@ -use std::collections::MapImpl; +use std::collections::Map; fn main() { let mut settings = config::Config::default(); @@ -9,7 +9,7 @@ fn main() { // Eg.. `APP_DEBUG=1 ./target/app` would set the `debug` key .merge(config::Environment::with_prefix("APP")).unwrap(); - // Print out our settings (as a MapImpl) + // Print out our settings (as a Map) println!("{:?}", - settings.try_into::>().unwrap()); + settings.try_into::>().unwrap()); } diff --git a/examples/watch/src/main.rs b/examples/watch/src/main.rs index fed4ed0..cbe30e7 100644 --- a/examples/watch/src/main.rs +++ b/examples/watch/src/main.rs @@ -1,5 +1,5 @@ use config::*; -use std::collections::MapImpl; +use std::collections::Map; use std::sync::RwLock; use notify::{RecommendedWatcher, DebouncedEvent, Watcher, RecursiveMode}; use std::sync::mpsc::channel; @@ -20,7 +20,7 @@ fn show() { .read() .unwrap() .clone() - .try_into::>() + .try_into::>() .unwrap()); } -- cgit v1.2.3