assembler: purge unwrap and use more AssembleErrors
This commit is contained in:
@@ -4,8 +4,10 @@ use std::io::Write;
|
||||
|
||||
pub fn input(prompt: &str) -> String {
|
||||
print!("{prompt}\n > ");
|
||||
std::io::stdout().flush().unwrap();
|
||||
std::io::stdout().flush().expect("Failed to flush stdout");
|
||||
let mut input = String::new();
|
||||
std::io::stdin().read_line(&mut input).unwrap();
|
||||
std::io::stdin()
|
||||
.read_line(&mut input)
|
||||
.expect("Failed to read line from stdin");
|
||||
input.trim().to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user