I have a Rust application which works as a shell. I want to get the working directory the user is in using as little dependencies as possible.
I tried using
let path = env::current_dir();
print!("{} > ",path.display());
But it gives me the following error: method not found in `Result<PathBuf, std::io::Error>'
I tried running this in the rust playground and it worked alright, so I was wondering if any of you could help me with this