Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
main: fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
decathorpe committed Jun 3, 2021
1 parent 8f0ed0a commit 83a4845
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@ fn main() -> Result<(), String> {
unstable_karma,
update_type,
} => {
let builds: Option<Vec<&str>> = match &builds {
Some(builds) => Some(builds.iter().map(|b| b.as_str()).collect()),
None => None,
};
let builds: Option<Vec<&str>> = builds
.as_ref()
.map(|builds| builds.iter().map(|b| b.as_str()).collect());

let mut builder = match (&builds, &from_tag) {
(Some(_), Some(_)) => unreachable!(),
Expand Down Expand Up @@ -410,10 +409,7 @@ fn main() -> Result<(), String> {
}
};

let requirements = match &requirements {
Some(reqs) => Some(reqs.join(",")),
None => None,
};
let requirements = requirements.as_ref().map(|reqs| reqs.join(","));
if let Some(requirements) = &requirements {
editor = editor.requirements(&requirements);
}
Expand Down

0 comments on commit 83a4845

Please sign in to comment.