summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Orchard <if_coding@fastmail.com>2021-08-02 23:17:08 -0700
committerDavid Orchard <if_coding@fastmail.com>2021-08-15 10:34:05 -0700
commitbe82af2a474b9c6ac85ec1e001af1704521820e6 (patch)
treeb065f9a4adaddfad570b370937e8081cd6fa70ed /examples
parent0e0ae2b359b5c943055c988c3c78f36db2503468 (diff)
Rename MapImpl to Map
Diffstat (limited to 'examples')
-rw-r--r--examples/async_source/main.rs4
-rw-r--r--examples/glob/src/main.rs14
-rw-r--r--examples/simple/src/main.rs6
-rw-r--r--examples/watch/src/main.rs4
4 files changed, 14 insertions, 14 deletions
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<MapImpl<String, config::Value>, ConfigError> {
+ async fn collect(&self) -> Result<Map<String, config::Value>, 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::<MapImpl<String, String>>().unwrap());
+ settings.try_into::<Map<String, String>>().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::<MapImpl<String, String>>().unwrap());
+ settings.try_into::<Map<String, String>>().unwrap());
// Option 3
// --------
@@ -43,7 +43,7 @@ fn main() {
.collect::<Vec<_>>())
.unwrap();
- // Print out our settings (as a MapImpl)
+ // Print out our settings (as a Map)
println!("\n{:?} \n\n-----------",
- settings.try_into::<MapImpl<String, String>>().unwrap());
+ settings.try_into::<Map<String, String>>().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::<MapImpl<String, String>>().unwrap());
+ settings.try_into::<Map<String, String>>().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::<MapImpl<String, String>>()
+ .try_into::<Map<String, String>>()
.unwrap());
}