@@ -123,8 +123,11 @@ export const miriVersionDetailsText = createSelector(getMiri, versionDetails);
123
123
124
124
const editionSelector = ( state : State ) => state . configuration . edition ;
125
125
126
- export const isNightlyChannel = ( state : State ) => (
127
- state . configuration . channel === Channel . Nightly
126
+ const channelSelector = ( state : State ) => state . configuration . channel ;
127
+
128
+ export const isNightlyChannel = createSelector (
129
+ channelSelector ,
130
+ ( channel ) => channel === Channel . Nightly ,
128
131
) ;
129
132
export const isHirAvailable = isNightlyChannel ;
130
133
@@ -142,10 +145,7 @@ export const getModeLabel = (state: State) => {
142
145
return `${ mode } ` ;
143
146
} ;
144
147
145
- export const getChannelLabel = ( state : State ) => {
146
- const { configuration : { channel } } = state ;
147
- return `${ channel } ` ;
148
- } ;
148
+ export const getChannelLabel = createSelector ( channelSelector , ( channel ) => `${ channel } ` ) ;
149
149
150
150
export const isEditionDefault = createSelector (
151
151
editionSelector ,
@@ -387,11 +387,12 @@ export const websocketStatusSelector = createSelector(
387
387
388
388
export const executeRequestPayloadSelector = createSelector (
389
389
codeSelector ,
390
+ channelSelector ,
390
391
( state : State ) => state . configuration ,
391
392
getBacktraceSet ,
392
393
( _state : State , { crateType, tests } : { crateType : string , tests : boolean } ) => ( { crateType, tests } ) ,
393
- ( code , configuration , backtrace , { crateType, tests } ) => ( {
394
- channel : configuration . channel ,
394
+ ( code , channel , configuration , backtrace , { crateType, tests } ) => ( {
395
+ channel,
395
396
mode : configuration . mode ,
396
397
edition : configuration . edition ,
397
398
crateType,
@@ -403,13 +404,14 @@ export const executeRequestPayloadSelector = createSelector(
403
404
404
405
export const compileRequestPayloadSelector = createSelector (
405
406
codeSelector ,
407
+ channelSelector ,
406
408
( state : State ) => state . configuration ,
407
409
getCrateType ,
408
410
runAsTest ,
409
411
getBacktraceSet ,
410
412
( _state : State , { target } : { target : string } ) => ( { target } ) ,
411
- ( code , configuration , crateType , tests , backtrace , { target } ) => ( {
412
- channel : configuration . channel ,
413
+ ( code , channel , configuration , crateType , tests , backtrace , { target } ) => ( {
414
+ channel,
413
415
mode : configuration . mode ,
414
416
edition : configuration . edition ,
415
417
crateType,
0 commit comments