diff --git a/src/main.rs b/src/main.rs index d2220e6..94ef145 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ mod parser; fn main() { let mut buffer = String::new(); - let mut result_bytes_read: io::Result; + let mut bytes_read_result: io::Result; let mut bytes_read: usize = 1; while bytes_read != 0 { @@ -15,13 +15,13 @@ fn main() { if io::stdout().flush().is_err() { eprintln!("error: can't fully flush stdout or reached EOF"); } - result_bytes_read = io::stdin().read_line(&mut buffer); + bytes_read_result = io::stdin().read_line(&mut buffer); - if result_bytes_read.is_err() { + if bytes_read_result.is_err() { eprintln!("error: invalid UTF-8 characters were read"); bytes_read = 1; } else { - bytes_read = result_bytes_read.unwrap(); + bytes_read = bytes_read_result.unwrap(); if bytes_read != 0 { let command_vec: Vec = parser::parse(&buffer); println!("{:?}", command_vec);