From ede8a9076a97b3ab41705450ad8190e4206be786 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 10 Jan 2019 20:10:54 -0800 Subject: [PATCH] Simplify some struct definitions --- schala-repl/src/repl/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schala-repl/src/repl/mod.rs b/schala-repl/src/repl/mod.rs index b288c68..56e85bb 100644 --- a/schala-repl/src/repl/mod.rs +++ b/schala-repl/src/repl/mod.rs @@ -24,14 +24,14 @@ pub struct Repl { impl Repl { pub fn new(languages: Vec>, 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 }