use syn::parse::{Parse, ParseStream};
use syn::Result;
pub(crate) struct Args;
impl Parse for Args {
fn parse(input: ParseStream<'_>) -> Result<Self> {
if input.is_empty() {
return Ok(Self);
}
Err(input.error(
"#[dynamic_config] takes no arguments since 0.2: the attribute \
declares, the builder configures. Move the source arguments to \
the builder — `files`/`name`+`paths` become `.file(..)` / \
`.discover(name, paths)`, `key` moves to `builder(\"key\")`, \
`env`/`nest`/`allow_empty_env`/`strict_env` become `.env(..)`, \
`.nest(..)`, `.allow_empty_env()`, `.strict_env()`, `env_files` \
becomes `.env_file(..)`, `profile_env` becomes \
`.profile_env(..)`, `cache`/`cache_mode` become `.cache(path, \
mode)`, `validate` becomes `.validate(f)`, and `watch`/`poll` \
become `.watch(debounce)` / `.watch_with(debounce, mode)` on \
the handle `init()` was called on. `save` and `schema` are the \
free functions `dynamic_config::save` and \
`dynamic_config::schema::document`.",
))
}
}