Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
  • Loading branch information
athei and bkchr authored Jan 30, 2022
commit 50ce2a80f0dd67c4d372923a307d7dfe6479b236
11 changes: 3 additions & 8 deletions utils/wasm-builder/src/wasm_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,8 @@ impl Profile {
.unwrap()
.to_string()
};
for profile in Profile::iter() {
if profile.directory() == name {
return profile
}
if let Some(profile) = Profile::iter().find(|p| p.directory() == name) {
return profile
}
panic!(
"Unexpected profile name: `{}`. One of the following is expected: {:?}",
Expand Down Expand Up @@ -504,10 +502,7 @@ impl Profile {

/// Whether the resulting binary should be compacted and compressed.
fn wants_compact(&self) -> bool {
match self {
Self::Debug => false,
_ => true,
}
!matches!(self, Self::Debug)
}
}

Expand Down