Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[naga xtask] Minor simplifications. #4883

Closed
Closed
Changes from all commits
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
14 changes: 7 additions & 7 deletions naga/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ fn run(args: Args) -> anyhow::Result<()> {
EasyCommand::simple("cargo", ["bench"]).success()
}
Subcommand::Validate(cmd) => {
let ack_visiting = |path: &Path| log::info!("Validating {}", path.display());
fn ack_visiting(path: &Path) {
log::info!("Validating {}", path.display());
}
let err_status = match cmd {
ValidateSubcommand::Spirv => {
let spirv_as = "spirv-as";
Expand Down Expand Up @@ -207,12 +209,10 @@ fn run(args: Args) -> anyhow::Result<()> {
compute,
} = hlsl_snapshots::Config::from_path(path.with_extension("ron"))?;
let mut status = ErrorStatus::NoFailuresFound;
[vertex, fragment, compute]
.into_iter()
.flatten()
.for_each(|shader| {
consume_config_item(path, shader).log_if_err_found(&mut status);
});
for shader in [vertex, fragment, compute].into_iter().flatten() {
consume_config_item(path, shader)
.log_if_err_found(&mut status);
}
match status {
ErrorStatus::NoFailuresFound => Ok(()),
ErrorStatus::OneOrMoreFailuresFound => bail!(
Expand Down
Loading