Skip to content

Commit

Permalink
Merge pull request #264 from primeos-work/clippy-fixes
Browse files Browse the repository at this point in the history
Fix Clippy warnings
  • Loading branch information
ammernico authored Jul 27, 2023
2 parents b210621 + 0f1aeeb commit ba6594a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/commands/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ async fn containers_top(
let hm = top
.titles
.into_iter()
.zip(processes.into_iter())
.zip(processes)
.collect::<HashMap<String, Vec<String>>>();
(container_id, hm)
})
Expand Down
14 changes: 6 additions & 8 deletions src/commands/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,13 @@ async fn of(matches: &ArgMatches, config: &Configuration, repo: Repository) -> R

(p, pathes)
})
.fold(Ok(std::io::stdout()), |out, (package, pathes)| {
out.and_then(|mut out| {
writeln!(out, "{} {}", package.name(), package.version())?;
for path in pathes {
writeln!(out, "\t{}", path.display())?;
}
.try_fold(std::io::stdout(), |mut out, (package, pathes)| {
writeln!(out, "{} {}", package.name(), package.version())?;
for path in pathes {
writeln!(out, "\t{}", path.display())?;
}

Ok(out)
})
Ok(out)
})
.map(|_| ())
}
6 changes: 3 additions & 3 deletions src/orchestrator/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ impl Borrow<ArtifactPath> for ProducedArtifact {
impl<'a> Orchestrator<'a> {
pub async fn run(self, output: &mut Vec<ArtifactPath>) -> Result<HashMap<Uuid, Error>> {
let (results, errors) = self.run_tree().await?;
output.extend(results.into_iter());
output.extend(results);
Ok(errors)
}

Expand Down Expand Up @@ -690,8 +690,8 @@ impl<'a> JobTask<'a> {
.iter()
.filter_map(crate::job::JobResource::env)
.map(|(k, v)| (k.clone(), v.clone()))
.chain(self.git_author_env.cloned().into_iter())
.chain(self.git_commit_env.cloned().into_iter())
.chain(self.git_author_env.cloned())
.chain(self.git_commit_env.cloned())
.collect::<Vec<_>>();

let replacement_artifacts = crate::db::FindArtifacts::builder()
Expand Down

0 comments on commit ba6594a

Please sign in to comment.