]> Repositorios git - scryer-prolog.git/commitdiff
use the updated readline.rs
authorMark Thom <[email protected]>
Sun, 17 Mar 2019 21:01:10 +0000 (15:01 -0600)
committerMark Thom <[email protected]>
Sun, 17 Mar 2019 21:01:10 +0000 (15:01 -0600)
Cargo.lock
Cargo.toml
src/prolog/read.rs

index 4672122a05df35fda8ab9d93f1b54e8c6956c9e3..0b9198dd04deb2f3d03c6be84b47b08d6ce28d43 100644 (file)
@@ -99,7 +99,6 @@ dependencies = [
 [[package]]
 name = "readline-rs"
 version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "redox_syscall"
@@ -122,7 +121,7 @@ dependencies = [
  "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ordered-float 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "prolog_parser 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "readline-rs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "readline-rs 0.1.0",
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -162,7 +161,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
 "checksum ordered-float 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7eb5259643245d3f292c7a146b2df53bba24d7eab159410e648eb73dc164669d"
 "checksum prolog_parser 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6da85e0cfa5a604edf65f753e629db37bfd04af93a09a1df5576d2197a2f7af3"
-"checksum readline-rs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eff1a6cf9fa562f0c40ec31d3f50b2e2a1924801926e706c932d616037fe199d"
 "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85"
 "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
index c1d3a783f977a71bedc62c868c68885919f79f80..572996cef427f3a9df982588ecd249c69e4f7342 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "scryer-prolog"
-version = "0.8.4"
+version = "0.8.5"
 authors = ["Mark Thom <[email protected]>"]
 repository = "https://github.com/mthom/scryer-prolog"
 description = "A modern Prolog implementation written mostly in Rust."
index 6416ce1f948dadd0f90ef14e1703a2468cbec613..da7254f98be0400ed46a421cc90b5b3971832381 100644 (file)
@@ -50,8 +50,8 @@ pub fn set_line_mode(mode: LineMode) {
     }
 }
 
-fn is_directive(buf: &String) -> bool {
-    match buf.as_str() {
+fn is_directive(buf: &str) -> bool {
+    match buf {
         "[user]" | "quit" | "clear" => true,
         _ => false
     }
@@ -80,7 +80,7 @@ unsafe extern "C" fn bind_cr(_: i32, _: i32) -> i32 {
         println!("");
         rl_done = 1;
     } else {
-        if let Some(ref buf) = rl_line_buffer_as_string() {
+        if let Some(buf) = rl_line_buffer_as_str() {
             if is_directive(buf) {
                 println!("");
                 rl_done = 1;