From 688bc5177951ce01d22395a1aa8ed7d43d23d73e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 26 Mar 2023 00:28:29 -0400 Subject: bump deps --- src/data.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/data.rs') diff --git a/src/data.rs b/src/data.rs index c2ea49e..ae89c9d 100644 --- a/src/data.rs +++ b/src/data.rs @@ -57,7 +57,8 @@ pub fn collect(opts: args::CommandLineOptions) -> PromptData { } fn hostname() -> Option { - if let Some(mut name) = hostname::get_hostname() { + if let Ok(name) = hostname::get() { + let mut name = name.into_string().unwrap(); if let Some(idx) = name.find('.') { name.truncate(idx); } @@ -84,7 +85,7 @@ fn home() -> Option { } fn user() -> Option { - users::get_current_username() + users::get_current_username().map(|s| s.into_string().unwrap()) } fn is_root() -> bool { -- cgit v1.2.3-54-g00ecf