Skip to content

Commit e57d716

Browse files
committed
Update to rust 2018 edition
1 parent 86f8776 commit e57d716

File tree

16 files changed

+14
-28
lines changed

16 files changed

+14
-28
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ keywords = ["config", "configuration", "settings", "env", "environment"]
99
authors = ["Ryan Leckey <[email protected]>"]
1010
categories = ["config"]
1111
license = "MIT/Apache-2.0"
12+
edition = "2018"
1213

1314
[badges]
1415
maintenance = { status = "actively-developed" }

examples/glob/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "glob"
33
version = "0.1.0"
4+
edition = "2018"
45

56
[dependencies]
67
config = { path = "../../" }

examples/glob/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
extern crate glob;
2-
extern crate config;
3-
41
use std::path::Path;
52
use std::collections::HashMap;
63
use config::*;

examples/global/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "global"
33
version = "0.1.0"
4+
edition = "2018"
45

56
[dependencies]
67
config = { path = "../../" }

examples/hierarchical-env/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "hierarchical-env"
33
version = "0.1.0"
4+
edition = "2018"
45

56
[dependencies]
67
config = { path = "../../" }

examples/hierarchical-env/src/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct Settings {
3838

3939
impl Settings {
4040
pub fn new() -> Result<Self, ConfigError> {
41-
let mut s = Config::new();
41+
let mut s = Config::default();
4242

4343
// Start off by merging in the "default" configuration file
4444
s.merge(File::with_name("config/default"))?;

examples/simple/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "simple"
33
version = "0.1.0"
4+
edition = "2018"
45

56
[dependencies]
67
config = { path = "../../" }

examples/simple/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate config;
2-
31
use std::collections::HashMap;
42

53
fn main() {

examples/watch/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "watch"
33
version = "0.1.0"
4+
edition = "2018"
45

56
[dependencies]
67
config = { path = "../../" }

examples/watch/src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
extern crate config;
2-
extern crate notify;
3-
4-
#[macro_use]
5-
extern crate lazy_static;
6-
71
use config::*;
82
use std::collections::HashMap;
93
use std::sync::RwLock;
104
use notify::{RecommendedWatcher, DebouncedEvent, Watcher, RecursiveMode};
115
use std::sync::mpsc::channel;
126
use std::time::Duration;
137

14-
lazy_static! {
8+
lazy_static::lazy_static! {
159
static ref SETTINGS: RwLock<Config> = RwLock::new({
1610
let mut settings = Config::default();
1711
settings.merge(File::with_name("Settings.toml")).unwrap();

0 commit comments

Comments
 (0)