|
@ -10,21 +10,21 @@ fn main() -> Result<()> { |
|
|
match readline {
|
|
|
match readline {
|
|
|
Ok(line) => {
|
|
|
Ok(line) => {
|
|
|
println!("Line: {}", line);
|
|
|
println!("Line: {}", line);
|
|
|
},
|
|
|
|
|
|
|
|
|
}
|
|
|
Err(ReadlineError::Interrupted) => {
|
|
|
Err(ReadlineError::Interrupted) => {
|
|
|
println!("CTRL-C");
|
|
|
println!("CTRL-C");
|
|
|
break
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
Err(ReadlineError::Eof) => {
|
|
|
Err(ReadlineError::Eof) => {
|
|
|
println!("CTRL-D");
|
|
|
println!("CTRL-D");
|
|
|
break
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
Err(err) => {
|
|
|
Err(err) => {
|
|
|
println!("Error: {:?}", err);
|
|
|
println!("Error: {:?}", err);
|
|
|
break
|
|
|
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
Ok(())
|
|
|
Ok(())
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|