]> Repositorios git - scryer-prolog.git/commitdiff
fix read module if readline is not present
authorMark Thom <[email protected]>
Tue, 3 Sep 2019 21:18:43 +0000 (15:18 -0600)
committerMark Thom <[email protected]>
Tue, 3 Sep 2019 21:18:43 +0000 (15:18 -0600)
src/prolog/read.rs

index 6af0794d02583eb6e90d3a0b68ab304d2a13ddb6..3eda829d3669e0e0fada7dd5e32a581f1d08bb39 100644 (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()) });