summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2021-06-24 18:23:50 -0400
committerRyan Geary <rtgnj42@gmail.com>2021-07-12 20:16:27 -0400
commit3f147da84c1d3d824b84d6473361746e91664a1e (patch)
tree56129ccc0c6d1a8b333f3dec1da818b707f92a00
parentb4af4ef2c2d2d3e39ae26f54c7bce0568a4d3236 (diff)
Apply clippy suggestions
-rw-r--r--src/choice.rs4
-rw-r--r--src/config.rs4
-rw-r--r--src/parse.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/choice.rs b/src/choice.rs
index 18f2a03..dcf3fe0 100644
--- a/src/choice.rs
+++ b/src/choice.rs
@@ -196,7 +196,7 @@ impl Choice {
.unwrap()
};
- return (start, end);
+ (start, end)
}
}
@@ -215,7 +215,7 @@ mod tests {
I: IntoIterator,
I::Item: Into<OsString> + Clone,
{
- return Config::new(Opt::from_iter(iter));
+ Config::new(Opt::from_iter(iter))
}
}
diff --git a/src/config.rs b/src/config.rs
index a279e24..97acaa3 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -17,9 +17,9 @@ impl Config {
|| choice.kind == ChoiceKind::RustExclusiveRange
{
if choice.is_reverse_range() {
- choice.start = choice.start - 1;
+ choice.start -= 1;
} else {
- choice.end = choice.end - 1;
+ choice.end -= 1;
}
}
diff --git a/src/parse.rs b/src/parse.rs
index 868da96..8a9fabb 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -58,7 +58,7 @@ pub fn choice(src: &str) -> Result<Choice, ParseError> {
}
};
- return Ok(Choice::new(start, end, kind));
+ Ok(Choice::new(start, end, kind))
}
pub fn output_field_separator(src: &str) -> String {