Simplify some struct definitions
This commit is contained in:
parent
a63dcf91b0
commit
ede8a9076a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user