summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2021-06-24 18:23:50 -0400
committerRyan Geary <rtgnj42@gmail.com>2021-06-24 18:23:50 -0400
commit729ce5c481726585e327a283622d1d43be3e00ff (patch)
tree56129ccc0c6d1a8b333f3dec1da818b707f92a00
parent0fd25a66e0c0f2157418d88571e94162ec679407 (diff)
Apply clippy suggestions34-error-message-after-exiting-less
-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 {