Skip to content

Commit

Permalink
doc(derive): Clarify default_value_t reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 3, 2023
1 parent 2ce5f46 commit a87b559
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_derive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@
//! - Without `<expr>`: fills the field with `Default::default()`
//! - `default_value = <str>`: [`Arg::default_value`][crate::Arg::default_value] and [`Arg::required(false)`][crate::Arg::required]
//! - `default_value_t [= <expr>]`: [`Arg::default_value`][crate::Arg::default_value] and [`Arg::required(false)`][crate::Arg::required]
//! - Requires `std::fmt::Display` or `#[arg(value_enum)]`
//! - Requires `std::fmt::Display` that roundtrips correctly with the
//! [`Arg::value_parser`][crate::Arg::value_parser] or `#[arg(value_enum)]`
//! - Without `<expr>`, relies on `Default::default()`
//! - `default_values_t = <expr>`: [`Arg::default_values`][crate::Arg::default_values] and [`Arg::required(false)`][crate::Arg::required]
//! - Requires field arg to be of type `Vec<T>` and `T` to implement `std::fmt::Display` or `#[arg(value_enum)]`
Expand Down

0 comments on commit a87b559

Please sign in to comment.