Commit 84501ef9 authored by stratact's avatar stratact Committed by GitHub

Merge pull request #2 from stratact/no-unwrap

Fix `read_line` to not unwrap by default
parents 37ac2459 a090dc8b
......@@ -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