summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/repl/handler.rs3
-rw-r--r--src/repl/mod.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index 45836ba..a061742 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -111,7 +111,8 @@ impl ReplCmdHandler {
ReplCmd::ReadFile(file) => {
let mut contents = String::new();
let mut file = fs::File::open(file).expect("Unable to open file");
- file.read_to_string(&mut contents).expect("Unable to read file");
+ file.read_to_string(&mut contents)
+ .expect("Unable to read file");
self.handle(ReplCmd::Submit(contents))?;
}
}
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index 7c99757..ecb58d0 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -27,11 +27,11 @@ pub const REPL_COMMANDS: [(&str, &str); 14] = [
(".conversation", "Start a conversation."),
(".clear conversation", "End current conversation."),
(".copy", "Copy the last output to the clipboard"),
+ (".read", "Read the contents of a file into the prompt"),
(".history", "Print the history"),
(".clear history", "Clear the history"),
(".help", "Print this help message"),
(".exit", "Exit the REPL"),
- (".read", "Read the contents of a file into the prompt"),
];
impl Repl {