diff --git a/dotenv/src/lib.rs b/dotenv/src/lib.rs index f2b1b0a..4017e81 100644 --- a/dotenv/src/lib.rs +++ b/dotenv/src/lib.rs @@ -75,7 +75,7 @@ pub fn vars() -> Vars { /// use std::env; /// use std::path::{Path}; /// -/// let my_path = env::home_dir().and_then(|a| Some(a.join("/.env"))).unwrap(); +/// let my_path = env::home_dir().map(|a| a.join("/.env")).unwrap(); /// dotenv::from_path(my_path.as_path()); /// ``` pub fn from_path>(path: P) -> Result<()> {