From a1dae653fa8c5d189ae1f26ea11bb0bf74409860 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Fri, 15 Dec 2017 17:23:16 -0800 Subject: [PATCH] String inconsistencies.... out of order???? --- src/options.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/options.rs b/src/options.rs index 7431784..4706e45 100644 --- a/src/options.rs +++ b/src/options.rs @@ -94,20 +94,22 @@ impl EngineOption { let mut option_data_string: String = String::new(); for (dt, eod) in self.option_data.iter() { - let dts = match *dt { - EngineOptionDataType::DefaultVal => "default", - EngineOptionDataType::Min => "min", - EngineOptionDataType::Max => "max", - EngineOptionDataType::Var => "var", + let _: (&EngineOptionDataType, &EngineOptionData) = (dt, eod); + + let dts = match dt { + &EngineOptionDataType::DefaultVal => "default", + &EngineOptionDataType::Min => "min", + &EngineOptionDataType::Max => "max", + &EngineOptionDataType::Var => "var", }; - let res = match *eod { - EngineOptionData::Int(v) => v.to_string(), - EngineOptionData::Float(v) => v.to_string(), - EngineOptionData::Text(ref v) => v.clone(), + let res = match eod { + &EngineOptionData::Int(v) => v.to_string(), + &EngineOptionData::Float(v) => v.to_string(), + &EngineOptionData::Text(ref v) => v.clone(), }; - option_data_string.push_str(&format!("{} {:?} ", dts, res)); + option_data_string.push_str(&format!("{} {} ", dts, res)); } let ots = match self.option_type {