X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Foptions.rs;h=4e4c7aa7753759c9a8b087d752f031c7b4edc805;hb=6f2630992fe340ad1a122ec10c649f756e478185;hp=d3d8be889ccceae1ea06b33f27133af522e6d044;hpb=8570a0b3c0fc320f0482f4bcc1d5a73d89903bfe;p=nihav.git diff --git a/nihav-core/src/options.rs b/nihav-core/src/options.rs index d3d8be8..4e4c7aa 100644 --- a/nihav-core/src/options.rs +++ b/nihav-core/src/options.rs @@ -183,7 +183,7 @@ impl NAOptionDefinition { Ok(()) }, NAValue::String(ref cur_str) => { - if let NAOptionDefinitionType::String(Some(ref strings)) = self.opt_type { + if let NAOptionDefinitionType::String(Some(strings)) = self.opt_type { for str in strings.iter() { if cur_str == str { return Ok(()); @@ -205,7 +205,7 @@ impl fmt::Display for NAOptionDefinition { NAOptionDefinitionType::None => write!(f, "{}: {}", self.name, self.description), NAOptionDefinitionType::Bool => write!(f, "[no]{}: {}", self.name, self.description), NAOptionDefinitionType::String(ref str_list) => { - if let Some(ref opts) = str_list { + if let Some(opts) = str_list { write!(f, "{} {}: {}", self.name, opts.join("|"), self.description) } else { write!(f, "{} : {}", self.name, self.description)