Skip to content

Commit 639981d

Browse files
committed
feat: update dependencies and rust edition
1 parent 3c1a77b commit 639981d

File tree

7 files changed

+21
-17
lines changed

7 files changed

+21
-17
lines changed

dotenv/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ readme = "../README.md"
1616
keywords = ["environment", "env", "dotenv", "settings", "config"]
1717
license = "MIT"
1818
repository = "https://github.com/dotenv-rs/dotenv"
19-
edition = "2018"
19+
edition = "2021"
2020

2121
[[bin]]
2222
name = "dotenv"
2323
required-features = ["cli"]
2424

2525
[dependencies]
26-
clap = { version = "2", optional = true }
26+
clap = { version = "3.1.6", optional = true }
2727

2828
[dev-dependencies]
29-
tempfile = "3.0.0"
29+
tempfile = "3.3.0"
3030

3131
[features]
3232
cli = ["clap"]

dotenv/src/bin/dotenv.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ fn make_command(name: &str, args: Vec<&str>) -> Command {
2929
fn main() {
3030
let matches = App::new("dotenv")
3131
.about("Run a command using the environment in a .env file")
32-
.usage("dotenv <COMMAND> [ARGS]...")
32+
.override_usage("dotenv <COMMAND> [ARGS]...")
3333
.setting(AppSettings::AllowExternalSubcommands)
3434
.setting(AppSettings::ArgRequiredElseHelp)
35-
.setting(AppSettings::UnifiedHelpMessage)
3635
.arg(
37-
Arg::with_name("FILE")
38-
.short("f")
36+
Arg::new("FILE")
37+
.short('f')
3938
.long("file")
4039
.takes_value(true)
4140
.help("Use a specific .env file (defaults to .env)"),
@@ -49,7 +48,7 @@ fn main() {
4948
.unwrap_or_else(|e| die!("error: failed to load environment: {}", e));
5049

5150
let mut command = match matches.subcommand() {
52-
(name, Some(matches)) => {
51+
Some((name, matches)) => {
5352
let args = matches
5453
.values_of("")
5554
.map(|v| v.collect())

dotenv/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! variables is not practical. It loads environment variables from a .env
55
//! file, if available, and mashes those with the actual environment variables
66
//! provided by the operating system.
7+
#![forbid(unsafe_code)]
78

89
mod errors;
910
mod find;

dotenv_codegen/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ license = "MIT"
1515
homepage = "https://github.com/dotenv-rs/dotenv"
1616
repository = "https://github.com/dotenv-rs/dotenv"
1717
description = "A `dotenv` implementation for Rust"
18-
edition = "2018"
18+
edition = "2021"
1919

2020
[dependencies]
21-
dotenv_codegen_implementation = { version = "0.15", path = "../dotenv_codegen_implementation" }
22-
proc-macro-hack = "0.5"
21+
dotenvy_codegen_impl = { version = "0.15", path = "../dotenv_codegen_impl" }
22+
proc-macro-hack = "0.5.19"

dotenv_codegen/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![forbid(unsafe_code)]
2+
13
use proc_macro_hack::proc_macro_hack;
24

35
#[proc_macro_hack]

dotenv_codegen_implementation/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ license = "MIT"
1818
homepage = "https://github.com/dotenv-rs/dotenv"
1919
repository = "https://github.com/dotenv-rs/dotenv"
2020
description = "A `dotenv` implementation for Rust"
21-
edition = "2018"
21+
edition = "2021"
2222

2323
[dependencies]
24-
proc-macro2 = "1"
25-
quote = "1"
26-
syn = "1"
27-
proc-macro-hack = "0.5"
28-
dotenv = { version = "0.15", path = "../dotenv" }
24+
proc-macro2 = "1.0.36"
25+
quote = "1.0.15"
26+
syn = "1.0.86"
27+
proc-macro-hack = "0.5.19"
28+
dotenvy = { version = "0.15", path = "../dotenv" }

dotenv_codegen_implementation/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![forbid(unsafe_code)]
2+
13
extern crate proc_macro;
24

35
use std::env::{self, VarError};

0 commit comments

Comments
 (0)