Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
allan2 committed Oct 5, 2024
1 parent f040116 commit f9ad2c6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/modify-macro/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! The `load` attribute loads and modifies the environment.
//!
//!
//! This is more ergonomic than the *modify* example.

use std::env;
Expand Down
2 changes: 1 addition & 1 deletion examples/modify-tokio-macro/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This is more ergonomic than the *modify-tokio* example.
//!
//!
//! The attribute macro executes `load_and_modify` before the tokio runtime is spawned.
//! When using this method, `#[dotenvy::load]` be put above `#[tokio::main]`.

Expand Down
5 changes: 2 additions & 3 deletions examples/modify-tokio/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! `load_and_modify` uses `std::env::set_var` internally, which is not thread-safe.
//!
//!
//! When modifying the environment, loading must be executed before the async runtime is spawned.
//!
//!
//! The *modify-tokio-macro* example contains a more ergonomic way to do this.

use dotenvy::EnvLoader;
Expand All @@ -10,7 +10,6 @@ use std::{
error,
};


fn main() -> Result<(), Box<dyn error::Error>> {
let loader = EnvLoader::with_path("../env-example");
unsafe { loader.load_and_modify() }?;
Expand Down
2 changes: 1 addition & 1 deletion examples/modify/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This example modifies the existing environment.
//!
//! This makes environment varaibles from available to subprocesses, e.g., a Python script.
//!
//!
//! The *modify-macro* example contains a more ergonomic way to do this.

use dotenvy::{EnvLoader, EnvSequence};
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple-files/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.sequence(EnvSequence::EnvThenInput)
.load()?;

// the sequence is `InputOnly` as we aleady loaded the program environment in the previous step.
// the sequence is `InputOnly` as we aleady loaded the program environment in the previous step.
let map_b = EnvLoader::with_path("../env-example-2")
.sequence(EnvSequence::InputOnly)
.load()?;
Expand Down

0 comments on commit f9ad2c6

Please sign in to comment.