1 2 3 4 5 6 7 8 9
use std::io::{self, Write}; pub fn read_user_input() -> anyhow::Result<String> { print!("> "); io::stdout().flush()?; let mut input = String::new(); io::stdin().read_line(&mut input)?; Ok(input.trim().to_string()) }