diff --git a/option_parser/src/lib.rs b/option_parser/src/lib.rs index ad71ca62b..e9b44461c 100644 --- a/option_parser/src/lib.rs +++ b/option_parser/src/lib.rs @@ -189,7 +189,7 @@ impl FromStr for IntegerList { let items: Vec<&str> = range.split('-').collect(); if items.len() > 2 { - return Err(IntegerListParseError::InvalidValue(range.to_string())); + return Err(IntegerListParseError::InvalidValue((*range).to_string())); } let start_range = items[0] @@ -203,7 +203,7 @@ impl FromStr for IntegerList { .parse::() .map_err(|_| IntegerListParseError::InvalidValue(items[1].to_owned()))?; if start_range >= end_range { - return Err(IntegerListParseError::InvalidValue(range.to_string())); + return Err(IntegerListParseError::InvalidValue((*range).to_string())); } for i in start_range..end_range { @@ -233,7 +233,9 @@ impl FromStr for TupleTwoIntegers { let items: Vec<&str> = tuple.split('@').collect(); if items.len() != 2 { - return Err(TupleTwoIntegersParseError::InvalidValue(tuple.to_string())); + return Err(TupleTwoIntegersParseError::InvalidValue( + (*tuple).to_string(), + )); } let item1 = items[0]