浏览代码

Update Rust documentation (1.11.0)

Thibaut Courouble 9 年之前
父节点
当前提交
dd8c6f1e76
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 1 0
      assets/stylesheets/pages/_rust.scss
  2. 2 2
      lib/docs/filters/rust/entries.rb
  3. 1 1
      lib/docs/scrapers/rust.rb

+ 1 - 0
assets/stylesheets/pages/_rust.scss

@@ -7,4 +7,5 @@
   div.stability { margin-bottom: 1em; }
   em.stab, span.stab { @extend %label; }
   em.stab.unstable, span.stab.unstable { @extend %label-orange; }
+  .since { float: right; }
 }

+ 2 - 2
lib/docs/filters/rust/entries.rb

@@ -48,8 +48,8 @@ module Docs
             [name, id]
           end
         elsif slug == 'error-index'
-          css('.error-described h2.section-header').map do |node|
-            [node.content, node['id']]
+          css('.error-described h2.section-header').each_with_object [] do |node, entries|
+            entries << [node.content, node['id']] unless node.content.include?('Note:')
           end
         else
           css('#methods + * + div > .method', '#required-methods + div > .method', '#provided-methods + div > .method').map do |node|

+ 1 - 1
lib/docs/scrapers/rust.rb

@@ -1,7 +1,7 @@
 module Docs
   class Rust < UrlScraper
     self.type = 'rust'
-    self.release = '1.10.0'
+    self.release = '1.11.0'
     self.base_url = 'https://doc.rust-lang.org/'
     self.root_path = 'book/index.html'
     self.initial_paths = %w(