Skip to content

Commit

Permalink
Merge pull request #79 from supabase/rs/remove_collect_iter
Browse files Browse the repository at this point in the history
remove unnecessary calls to `collect`
  • Loading branch information
imor authored Aug 15, 2023
2 parents cdfaf6b + e768ab4 commit 5719713
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cli/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,8 @@ impl ControlFileRef {
for line in self.contents.lines() {
if line.starts_with("requires") {
let value = self.read_control_line_value(line)?;
let required_packages: Vec<String> = value
.split(',')
.collect::<Vec<&str>>()
.iter()
.map(|x| x.trim().to_string())
.collect();
let required_packages: Vec<String> =
value.split(',').map(|x| x.trim().to_string()).collect();
return Ok(Some(required_packages));
}
}
Expand Down

1 comment on commit 5719713

@vercel
Copy link

@vercel vercel bot commented on 5719713 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.