Simplify some struct definitions

This commit is contained in:
greg 2019-01-10 20:10:54 -08:00
parent a63dcf91b0
commit ede8a9076a
1 changed files with 3 additions and 3 deletions

View File

@ -24,14 +24,14 @@ pub struct Repl {
impl Repl {
pub fn new(languages: Vec<Box<ProgrammingLanguageInterface>>, initial_index: usize) -> Repl {
use linefeed::Interface;
let i = if initial_index < languages.len() { initial_index } else { 0 };
let current_language_index = if initial_index < languages.len() { initial_index } else { 0 };
let line_reader = Interface::new("schala-repl").unwrap();
Repl {
options: Repl::get_options(),
languages: languages,
current_language_index: i,
languages,
current_language_index,
interpreter_directive_sigil: ':',
line_reader
}