Skip to content

Commit

Permalink
Switch example to use eprintln.
Browse files Browse the repository at this point in the history
  • Loading branch information
notpeter committed Apr 26, 2024
1 parent 803d4d8 commit f4490d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Crate exports a single function `env_home_dir` that returns `Option<PathBuf>`
use env_home::env_home_dir as home_dir;
fn main() {
match home_dir() {
Some(path) => println!("User home directory: {}", path.display()),
None => println!("No home found. HOME/USERPROFILE not set or empty"),
Some(path) => eprintln!("User home directory: {}", path.display()),
None => eprintln!("No home found. HOME/USERPROFILE not set or empty"),
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//! use env_home::env_home_dir as home_dir;
//! fn main() {
//! match home_dir() {
//! Some(path) => println!("User home directory: {}", path.display()),
//! None => println!("No home found. HOME/USERPROFILE not set or empty"),
//! Some(path) => eprintln!("User home directory: {}", path.display()),
//! None => eprintln!("No home found. HOME/USERPROFILE not set or empty"),
//! }
//! }
//! ```
Expand Down

0 comments on commit f4490d5

Please sign in to comment.