Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AldaronLau committed Mar 4, 2024
1 parent 00a542a commit 7ff0c80
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,47 @@
//!
//! ```rust
//! println!(
//! "User's Name whoami::realname(): {}",
//! whoami::realname(),
//! "User's Language whoami::langs(): {}",
//! whoami::langs()
//! .map(|l| {
//! l.map(|l| l.to_string()).collect::<Vec<String>>().join(", ")
//! })
//! .unwrap_or_else(|_| "??".to_string()),
//! );
//! println!(
//! "User's Username whoami::username(): {}",
//! whoami::username(),
//! "User's Name whoami::realname(): {}",
//! whoami::realname().unwrap_or_else(|_| "<unknown>".to_string()),
//! );
//! println!(
//! "User's Language whoami::lang(): {:?}",
//! whoami::lang().collect::<Vec<String>>(),
//! "User's Username whoami::username(): {}",
//! whoami::username().unwrap_or_else(|_| "<unknown>".to_string()),
//! );
//! println!(
//! "Device's Pretty Name whoami::devicename(): {}",
//! whoami::devicename(),
//! "User's Username whoami::account(): {}",
//! whoami::account().unwrap_or_else(|_| "<unknown>".to_string()),
//! );
//! println!(
//! "Device's Hostname whoami::hostname(): {}",
//! whoami::hostname(),
//! "Device's Pretty Name whoami::devicename(): {}",
//! whoami::devicename().unwrap_or_else(|_| "<unknown>".to_string()),
//! );
//! println!(
//! "Device's Platform whoami::platform(): {}",
//! "Device's Hostname whoami::hostname(): {}",
//! whoami::hostname().unwrap_or_else(|_| "<unknown>".to_string()),
//! );
//! println!(
//! "Device's Platform whoami::platform(): {}",
//! whoami::platform(),
//! );
//! println!(
//! "Device's OS Distro whoami::distro(): {}",
//! whoami::distro(),
//! "Device's OS Distro whoami::distro(): {}",
//! whoami::distro().unwrap_or_else(|_| "<unknown>".to_string()),
//! );
//! println!(
//! "Device's Desktop Env. whoami::desktop_env(): {}",
//! "Device's Desktop Env. whoami::desktop_env(): {}",
//! whoami::desktop_env(),
//! );
//! println!(
//! "Device's CPU Arch whoami::arch(): {}",
//! "Device's CPU Arch whoami::arch(): {}",
//! whoami::arch(),
//! );
//! ```
Expand Down

0 comments on commit 7ff0c80

Please sign in to comment.