Remove some warnings

This commit is contained in:
greg 2019-03-16 18:45:40 -07:00
parent ac0050e5d1
commit 9e58e3d7de
2 changed files with 1 additions and 4 deletions

View File

@ -1,5 +1,3 @@
use std::collections::HashMap;
use colored::*;
use std::time; use std::time;
#[derive(Debug, Default, Serialize, Deserialize)] #[derive(Debug, Default, Serialize, Deserialize)]

View File

@ -19,7 +19,6 @@ use std::path::Path;
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;
use std::process::exit; use std::process::exit;
use std::default::Default;
mod repl; mod repl;
mod language; mod language;
@ -59,7 +58,7 @@ fn run_noninteractive(filename: &str, languages: Vec<Box<ProgrammingLanguageInte
println!("Source file lacks extension"); println!("Source file lacks extension");
exit(1); exit(1);
}); });
let mut language = Box::new(languages.into_iter().find(|lang| lang.get_source_file_suffix() == ext) let language = Box::new(languages.into_iter().find(|lang| lang.get_source_file_suffix() == ext)
.unwrap_or_else(|| { .unwrap_or_else(|| {
println!("Extension .{} not recognized", ext); println!("Extension .{} not recognized", ext);
exit(1); exit(1);