From 0de504eb9e79d883a8798c164e61f51984fefbdd Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 24 Mar 2018 23:28:00 -0700 Subject: [PATCH] Kill unused items in schala-repl --- schala-repl/src/language.rs | 8 ++++---- schala-repl/src/webapp.rs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index abd1469..c21b1b0 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -100,10 +100,10 @@ impl FinishedComputation { let color = artifact.text_color; let stage = stage.color(color).bold(); let output = artifact.debug_output.color(color); - write!(&mut buf, "{}: {}\n", stage, output); + write!(&mut buf, "{}: {}\n", stage, output).unwrap(); } } - write!(&mut buf, "{}", output); + write!(&mut buf, "{}", output).unwrap(); buf } Err(ref s) => format!("{} {}", "Error: ".red().bold(), s) @@ -111,7 +111,7 @@ impl FinishedComputation { } pub fn to_noninteractive(&self) -> Option { match self.text_output { - Ok(ref s) => None, + Ok(_) => None, Err(ref s) => Some(format!("{} {}", "Error: ".red().bold(), s)) } } @@ -154,7 +154,7 @@ pub trait ProgrammingLanguageInterface { } /* old */ - fn execute(&mut self, input: &str, eval_options: &EvalOptions) -> FinishedComputation { + fn execute(&mut self, _input: &str, _eval_options: &EvalOptions) -> FinishedComputation { FinishedComputation { artifacts: HashMap::new(), text_output: Err(format!("REPL evaluation not implemented")) } } fn get_language_name(&self) -> String; diff --git a/schala-repl/src/webapp.rs b/schala-repl/src/webapp.rs index 8f2f844..5d4975e 100644 --- a/schala-repl/src/webapp.rs +++ b/schala-repl/src/webapp.rs @@ -1,7 +1,6 @@ use rocket; use rocket::State; use rocket::response::Content; -use rocket::response::NamedFile; use rocket::http::ContentType; use rocket_contrib::Json; use language::{ProgrammingLanguageInterface, EvalOptions};