@@ -27,7 +27,6 @@ import {
2727 ProcessAssembly ,
2828 Position ,
2929 makePosition ,
30- Version ,
3130 Crate ,
3231} from './types' ;
3332
@@ -48,14 +47,7 @@ export const routes = {
4847 macroExpansion : '/macro-expansion' ,
4948 meta : {
5049 crates : '/meta/crates' ,
51- version : {
52- stable : '/meta/version/stable' ,
53- beta : '/meta/version/beta' ,
54- nightly : '/meta/version/nightly' ,
55- rustfmt : '/meta/version/rustfmt' ,
56- clippy : '/meta/version/clippy' ,
57- miri : '/meta/version/miri' ,
58- } ,
50+ versions : '/meta/versions' ,
5951 gistSave : '/meta/gist' ,
6052 gistLoad : '/meta/gist/id' ,
6153 } ,
@@ -103,8 +95,6 @@ export enum ActionType {
10395 MacroExpansionFailed = 'MACRO_EXPANSION_FAILED' ,
10496 RequestCratesLoad = 'REQUEST_CRATES_LOAD' ,
10597 CratesLoadSucceeded = 'CRATES_LOAD_SUCCEEDED' ,
106- RequestVersionsLoad = 'REQUEST_VERSIONS_LOAD' ,
107- VersionsLoadSucceeded = 'VERSIONS_LOAD_SUCCEEDED' ,
10898 NotificationSeen = 'NOTIFICATION_SEEN' ,
10999 BrowserWidthChanged = 'BROWSER_WIDTH_CHANGED' ,
110100}
@@ -488,42 +478,6 @@ export function performCratesLoad(): ThunkAction {
488478 } ;
489479}
490480
491- const requestVersionsLoad = ( ) =>
492- createAction ( ActionType . RequestVersionsLoad ) ;
493-
494- const receiveVersionsLoadSuccess = ( {
495- stable, beta, nightly, rustfmt, clippy, miri,
496- } : {
497- stable : Version , beta : Version , nightly : Version , rustfmt : Version , clippy : Version , miri : Version ,
498- } ) =>
499- createAction ( ActionType . VersionsLoadSucceeded , { stable, beta, nightly, rustfmt, clippy, miri } ) ;
500-
501- export function performVersionsLoad ( ) : ThunkAction {
502- return function ( dispatch ) {
503- dispatch ( requestVersionsLoad ( ) ) ;
504-
505- const stable = jsonGet ( routes . meta . version . stable ) ;
506- const beta = jsonGet ( routes . meta . version . beta ) ;
507- const nightly = jsonGet ( routes . meta . version . nightly ) ;
508- const rustfmt = jsonGet ( routes . meta . version . rustfmt ) ;
509- const clippy = jsonGet ( routes . meta . version . clippy ) ;
510- const miri = jsonGet ( routes . meta . version . miri ) ;
511-
512- const all = Promise . all ( [ stable , beta , nightly , rustfmt , clippy , miri ] ) ;
513-
514- return all
515- . then ( ( [ stable , beta , nightly , rustfmt , clippy , miri ] ) => dispatch ( receiveVersionsLoadSuccess ( {
516- stable,
517- beta,
518- nightly,
519- rustfmt,
520- clippy,
521- miri,
522- } ) ) ) ;
523- // TODO: Failure case
524- } ;
525- }
526-
527481const notificationSeen = ( notification : Notification ) =>
528482 createAction ( ActionType . NotificationSeen , { notification } ) ;
529483
@@ -654,8 +608,6 @@ export type Action =
654608 | ReturnType < typeof receiveMacroExpansionFailure >
655609 | ReturnType < typeof requestCratesLoad >
656610 | ReturnType < typeof receiveCratesLoadSuccess >
657- | ReturnType < typeof requestVersionsLoad >
658- | ReturnType < typeof receiveVersionsLoadSuccess >
659611 | ReturnType < typeof notificationSeen >
660612 | ReturnType < typeof browserWidthChanged >
661613 | ReturnType < typeof wsExecuteRequest >
0 commit comments