Commit a090dc8b authored by stratact's avatar stratact

Fix `read_line` to not unwrap by default

parent 98981ecd
......@@ -92,8 +92,8 @@ impl Context {
buffer: B,
) -> io::Result<String> {
let res = {
let stdout = stdout().into_raw_mode().unwrap();
let ed = try!(Editor::new_with_init_buffer(stdout, prompt, self, buffer));
let stdout = stdout().into_raw_mode()?;
let ed = Editor::new_with_init_buffer(stdout, prompt, self, buffer)?;
match self.key_bindings {
KeyBindings::Emacs => Self::handle_keys(keymap::Emacs::new(ed), handler),
KeyBindings::Vi => Self::handle_keys(keymap::Vi::new(ed), handler),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment