Skip to content

Commit

Permalink
Fix default construction path
Browse files Browse the repository at this point in the history
  • Loading branch information
allan2 committed Sep 9, 2024
1 parent 169a60e commit c2070b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dotenvy-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use syn::{
/// Three optional arguments are supported: `path`, `required`, and `override_`.
/// Usage is like `#[dotenvy::load(path = ".env", required = true, override_ = true)]`.
///
/// The default path is "./env". The default sequence is `EnvSequence::InputThenEnv`.
/// The default path is "./.env". The default sequence is `EnvSequence::InputThenEnv`.
#[proc_macro_attribute]
pub fn load(attr: TokenStream, item: TokenStream) -> TokenStream {
let attrs = parse_macro_input!(attr as LoadInput);
Expand Down
7 changes: 4 additions & 3 deletions dotenvy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#![allow(
clippy::missing_errors_doc,
clippy::too_many_lines,
clippy::missing_safety_doc
clippy::missing_safety_doc,
unused_unsafe, // until Rust 2024
)]
#![deny(clippy::uninlined_format_args, clippy::wildcard_imports)]

Expand Down Expand Up @@ -133,9 +134,9 @@ pub struct EnvLoader<'a> {

impl<'a> EnvLoader<'a> {
#[must_use]
/// Creates a new `EnvLoader` with the path set to `./env` in the current directory.
/// Creates a new `EnvLoader` with the path set to `./.env` in the current directory.
pub fn new() -> Self {
Self::with_path("./env")
Self::with_path("./.env")
}

/// Creates a new `EnvLoader` with the path as input.
Expand Down

0 comments on commit c2070b0

Please sign in to comment.