Skip to content

Commit

Permalink
Add async usage guidance for attribute macro
Browse files Browse the repository at this point in the history
  • Loading branch information
allan2 committed Oct 5, 2024
1 parent 5508e50 commit 85e13d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dotenvy-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use syn::{
/// Three optional arguments are supported: `path`, `required`, and `override_`.
/// Usage is like `#[dotenvy::load(path = ".env", required = true, override_ = true)]`.
///
/// When using in an async runtime, `load` must be placed above async runtime spawning macros such as `tokio::main`.
///
/// The default path is "./.env". The default sequence is `EnvSequence::InputThenEnv`.
#[proc_macro_attribute]
pub fn load(attr: TokenStream, item: TokenStream) -> TokenStream {
Expand Down

0 comments on commit 85e13d1

Please sign in to comment.