Skip to content

Commit

Permalink
feat: update dependencies and rust edition
Browse files Browse the repository at this point in the history
  • Loading branch information
somehowchris committed Jan 12, 2022
1 parent 3c1a77b commit 21f0738
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
6 changes: 3 additions & 3 deletions dotenv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ readme = "../README.md"
keywords = ["environment", "env", "dotenv", "settings", "config"]
license = "MIT"
repository = "https://github.com/dotenv-rs/dotenv"
edition = "2018"
edition = "2021"

[[bin]]
name = "dotenv"
required-features = ["cli"]

[dependencies]
clap = { version = "2", optional = true }
clap = { version = "3.0.6", optional = true }

[dev-dependencies]
tempfile = "3.0.0"
tempfile = "3.3.0"

[features]
cli = ["clap"]
9 changes: 4 additions & 5 deletions dotenv/src/bin/dotenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ fn make_command(name: &str, args: Vec<&str>) -> Command {
fn main() {
let matches = App::new("dotenv")
.about("Run a command using the environment in a .env file")
.usage("dotenv <COMMAND> [ARGS]...")
.override_usage("dotenv <COMMAND> [ARGS]...")
.setting(AppSettings::AllowExternalSubcommands)
.setting(AppSettings::ArgRequiredElseHelp)
.setting(AppSettings::UnifiedHelpMessage)
.arg(
Arg::with_name("FILE")
.short("f")
Arg::new("FILE")
.short('f')
.long("file")
.takes_value(true)
.help("Use a specific .env file (defaults to .env)"),
Expand All @@ -49,7 +48,7 @@ fn main() {
.unwrap_or_else(|e| die!("error: failed to load environment: {}", e));

let mut command = match matches.subcommand() {
(name, Some(matches)) => {
Some((name, matches)) => {
let args = matches
.values_of("")
.map(|v| v.collect())
Expand Down
1 change: 1 addition & 0 deletions dotenv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! variables is not practical. It loads environment variables from a .env
//! file, if available, and mashes those with the actual environment variables
//! provided by the operating system.
#![forbid(unsafe_code)]

mod errors;
mod find;
Expand Down
6 changes: 3 additions & 3 deletions dotenv_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ license = "MIT"
homepage = "https://github.com/dotenv-rs/dotenv"
repository = "https://github.com/dotenv-rs/dotenv"
description = "A `dotenv` implementation for Rust"
edition = "2018"
edition = "2021"

[dependencies]
dotenv_codegen_implementation = { version = "0.15", path = "../dotenv_codegen_implementation" }
proc-macro-hack = "0.5"
dotenv_codegen_implementation = { path = "../dotenv_codegen_implementation" }
proc-macro-hack = "0.5.19"
2 changes: 2 additions & 0 deletions dotenv_codegen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![forbid(unsafe_code)]

use proc_macro_hack::proc_macro_hack;

#[proc_macro_hack]
Expand Down
12 changes: 6 additions & 6 deletions dotenv_codegen_implementation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ license = "MIT"
homepage = "https://github.com/dotenv-rs/dotenv"
repository = "https://github.com/dotenv-rs/dotenv"
description = "A `dotenv` implementation for Rust"
edition = "2018"
edition = "2021"

[dependencies]
proc-macro2 = "1"
quote = "1"
syn = "1"
proc-macro-hack = "0.5"
dotenv = { version = "0.15", path = "../dotenv" }
proc-macro2 = "1.0.36"
quote = "1.0.14"
syn = "1.0.85"
proc-macro-hack = "0.5.19"
dotenv = { path = "../dotenv" }
2 changes: 2 additions & 0 deletions dotenv_codegen_implementation/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![forbid(unsafe_code)]

extern crate proc_macro;

use std::env::{self, VarError};
Expand Down

0 comments on commit 21f0738

Please sign in to comment.