]> 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 5678ebec7220c916dd2551e779c52dd5483b15dc..6e810a349bfccb640adbabfd9ce97d258bfd91d0 100644 (file)
@@ -4,7 +4,7 @@
     <meta charset="UTF-8"/>
     <meta name="viewport" content="width=device-width, initial-scale=1"/>
 
-    <title>Clippy</title>
+    <title>Clippy lints documentation</title>
 
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/>
     <style>
                 <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>
         </div>
     </div>
 
-    <a href="https://github.com/rust-lang-nursery/rust-clippy">
+    <a href="https://github.com/rust-lang/rust-clippy">
         <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"/>
     </a>
 
         .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('.')