]> git.lizzy.rs Git - rust.git/blobdiff - util/gh-pages/versions.html
Fix clippy for let-else
[rust.git] / util / gh-pages / versions.html
index 391e22a4743ccdcd739f536304cf6736c63a609d..6e810a349bfccb640adbabfd9ce97d258bfd91d0 100644 (file)
@@ -36,7 +36,7 @@
                 <ul class="list-group">
                     <a class="list-group-item" ng-repeat="version in data | orderBy:versionOrder:true"
                        href="./{{version}}/index.html">
-                        {{normalizeVersion(version)}}
+                        {{normalizeVersionDisplay(version)}}
                     </a>
                 </ul>
             </article>
         .controller('docVersions', function ($scope, $http) {
             $scope.loading = true;
 
-            $scope.normalizeVersion = function(v) {
+            $scope.normalizeVersionDisplay = function(v) {
                 return v.replace(/^v/, '');
             };
 
+            $scope.normalizeVersion = function(v) {
+                return v.replace(/^v/, '').replace(/^rust-/, '');
+            };
+
             $scope.versionOrder = function(v) {
                 if (v === 'master') { return Infinity; }
-                if (v === 'current') { return Number.MAX_VALUE; }
+                if (v === 'stable') { return Number.MAX_VALUE; }
+                if (v === 'beta') { return Number.MAX_VALUE - 1; }
 
                 return $scope.normalizeVersion(v)
                     .split('.')