mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Don't match on the same thing twice
This commit is contained in:
parent
b7726c87bb
commit
f39eaff217
1 changed files with 7 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue