File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -113,10 +113,15 @@ pub fn merge_universes(
113113 old. env . merge ( new. env ) ;
114114 }
115115 fn merge_library ( old : & mut RustLibrary , new : RustLibrary ) {
116- // TODO: merge platform maps instead of unwrapping (I think platform
117- // keys can differ? They certainly will if we add per-universe fixups)
118- for ( platform, select) in new. common . platform {
119- merge_selects ( old. common . platform . get_mut ( & platform) . unwrap ( ) , select) ;
116+ for ( platform, new_select) in new. common . platform {
117+ match old. common . platform . get_mut ( & platform) {
118+ Some ( old_select) => {
119+ merge_selects ( old_select, new_select) ;
120+ }
121+ None => {
122+ old. common . platform . insert ( platform, new_select) ;
123+ }
124+ }
120125 }
121126 merge_selects ( & mut old. common . base , new. common . base ) ;
122127 }
You can’t perform that action at this time.
0 commit comments