From 6ebeaa9246fba06a7d13f3ce05e170443818f414 Mon Sep 17 00:00:00 2001 From: Praveen Paladugu Date: Wed, 23 Sep 2020 20:31:53 +0000 Subject: [PATCH] option_parser: fix clippy warnings Signed-off-by: Praveen Paladugu --- option_parser/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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]