From ca37e006b97a490d736d82e2b81ad8ad5c8c2d7a Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 21 Jun 2019 02:01:46 -0700 Subject: [PATCH] Fix some dyn's --- schala-repl/src/lib.rs | 2 +- schala-repl/src/repl/mod.rs | 6 +++--- src/main.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index 2e02d41..579d811 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -51,7 +51,7 @@ pub fn start_repl(langs: Vec>) { }; } -fn run_noninteractive(filename: &str, languages: Vec>) { +fn run_noninteractive(filename: &str, languages: Vec>) { let path = Path::new(filename); let ext = path.extension().and_then(|e| e.to_str()).unwrap_or_else(|| { println!("Source file lacks extension"); diff --git a/schala-repl/src/repl/mod.rs b/schala-repl/src/repl/mod.rs index 32c339a..3e03358 100644 --- a/schala-repl/src/repl/mod.rs +++ b/schala-repl/src/repl/mod.rs @@ -23,12 +23,12 @@ type InterpreterDirectiveOutput = Option; pub struct Repl { pub interpreter_directive_sigil: char, line_reader: ::linefeed::interface::Interface<::linefeed::terminal::DefaultTerminal>, - language_states: Vec>, + language_states: Vec>, options: ReplOptions, } impl Repl { - pub fn new(initial_states: Vec>) -> Repl { + pub fn new(initial_states: Vec>) -> Repl { use linefeed::Interface; let line_reader = Interface::new("schala-repl").unwrap(); let interpreter_directive_sigil = ':'; @@ -113,7 +113,7 @@ impl Repl { directives.perform(self, &arguments) } - fn get_cur_language_state(&mut self) -> &mut Box { + fn get_cur_language_state(&mut self) -> &mut Box { //TODO this is obviously not complete &mut self.language_states[0] } diff --git a/src/main.rs b/src/main.rs index 231d7fa..beb792a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,7 @@ use schala_repl::{ProgrammingLanguageInterface, start_repl}; extern { } fn main() { - let langs: Vec> = vec![Box::new(schala_lang::Schala::new())]; + let langs: Vec> = vec![Box::new(schala_lang::Schala::new())]; start_repl(langs); }