diff --git a/src/options.rs b/src/options.rs index 95a2ddb..7b45b27 100644 --- a/src/options.rs +++ b/src/options.rs @@ -91,20 +91,20 @@ impl EngineOption { } pub fn option_string(&self) -> String { - let mut option_data_string: String = "".to_owned(); + let mut option_data_string: String = String::new(); - for (ref dt, ref eod) in &self.option_data { - let dts = match dt { + for (ref dt, ref eod) in self.option_data { + let dts = match *dt { EngineOptionDataType::DefaultVal => "default", EngineOptionDataType::Min => "min", EngineOptionDataType::Max => "max", EngineOptionDataType::Var => "var", }; - let res = match eod { + let res = match *eod { EngineOptionData::Int(v) => v.to_string(), EngineOptionData::Float(v) => v.to_string(), - EngineOptionData::Text(v) => v.cloned(), + EngineOptionData::Text(v) => v, }; option_data_string.push_str(&format!("{} {:?} ", dts, res));