mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Remove needless .ok() calls in main.rs
This commit is contained in:
@@ -119,7 +119,7 @@ fn shell_exec(vm: &mut VirtualMachine, source: &str, scope: PyObjectRef) -> bool
|
||||
fn read_until_empty_line(input: &mut String) -> Result<i32, std::io::Error> {
|
||||
loop {
|
||||
print!("..... ");
|
||||
io::stdout().flush().ok().expect("Could not flush stdout");
|
||||
io::stdout().flush().expect("Could not flush stdout");
|
||||
let mut line = String::new();
|
||||
match io::stdin().read_line(&mut line) {
|
||||
Ok(0) => {
|
||||
@@ -151,7 +151,7 @@ fn run_shell() {
|
||||
let mut input = String::new();
|
||||
loop {
|
||||
print!(">>>>> "); // Use 5 items. pypy has 4, cpython has 3.
|
||||
io::stdout().flush().ok().expect("Could not flush stdout");
|
||||
io::stdout().flush().expect("Could not flush stdout");
|
||||
match io::stdin().read_line(&mut input) {
|
||||
Ok(0) => {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user