Skip to content

Commit 620e86e

Browse files
committed
chore: finish docs
1 parent 272abce commit 620e86e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/utils/from_env.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ use std::{convert::Infallible, env::VarError, num::ParseIntError, str::FromStr};
6262
/// )]
6363
/// maybe_not_needed: Option<String>,
6464
/// }
65+
///
66+
/// # fn use_it() {
67+
/// if let Err(missing) = MyCfg::check_inventory() {
68+
/// println!("Missing environment variables:");
69+
/// for var in missing {
70+
/// println!("{}: {}", var.var, var.description);
71+
/// }
72+
/// }
73+
/// # }
6574
/// ```
6675
///
6776
/// This will generate a `FromEnv` implementation for the struct, and a

0 commit comments

Comments
 (0)