Don't match on the same thing twice

This commit is contained in:
Richard Feldman 2022-11-22 10:34:04 -05:00
parent b7726c87bb
commit f39eaff217
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -2303,21 +2303,20 @@ fn update<'a>(
}
}
if let Platform {
config_shorthand, ..
} = header.header_for
{
work.extend(state.dependencies.notify_package(config_shorthand));
}
match header.header_for {
App { to_platform } => {
debug_assert!(matches!(state.platform_path, PlatformPath::NotSpecified));
state.platform_path = PlatformPath::Valid(to_platform);
}
Platform { main_for_host, .. } => {
Platform {
main_for_host,
config_shorthand,
..
} => {
debug_assert!(matches!(state.platform_data, None));
work.extend(state.dependencies.notify_package(config_shorthand));
state.platform_data = Some(PlatformData {
module_id: header.module_id,
provides: main_for_host,