fix read module if readline is not present

This commit is contained in:
Mark Thom
2019-09-03 15:18:43 -06:00
parent cefcf916c3
commit a757b92c9d

View File

@@ -159,18 +159,6 @@ pub mod readline
}
}
pub fn read_batch(_: &str) -> Result<Vec<u8>, ::SessionError> {
let mut buf = vec![];
let stdin = stdin();
let mut stdin = stdin.lock();
match stdin.read_to_end(&mut buf) {
Ok(_) => Ok(buf),
_ => Err(::SessionError::UserPrompt)
}
}
#[inline]
pub fn input_stream() -> ::PrologStream {
let reader: Box<Read> = Box::new(StdinWrapper { buf: BufReader::new(stdin()) });