I'm writing a small script in Rust and I need to get the user who is running it. I thought to retrieve the user using a simple process, something like this:
let output = Command::new("whoami")
.output();
let user = output.stdout;
I don't know how to convert user
into a string so that I can use it for println!
.