Skip to content

Commit 2a2c11b

Browse files
committed
Update Rust documentation (1.88.0)
Fixes #2510.
1 parent 131007f commit 2a2c11b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/docs/filters/rust/entries.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ class EntriesFilter < Docs::EntriesFilter
44

55
def get_name
66
if slug.start_with?('book') || slug.start_with?('reference')
7-
name = at_css("#sidebar a[href='#{File.basename(slug)}']")
8-
name ? name.content : 'Introduction'
7+
name = at_css("h2", "h1")
8+
ch1 = slug[/ch(\d+)-(\d+)/, 1]
9+
ch2 = slug[/ch(\d+)-(\d+)/, 2]
10+
name ? "#{ch1}.#{ch2}. #{name.content}" : 'Introduction'
911
elsif slug == 'error-index'
1012
'Compiler Errors'
1113
else

lib/docs/scrapers/rust.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Docs
44
class Rust < UrlScraper
55
self.type = 'rust'
6-
self.release = '1.87.0'
6+
self.release = '1.88.0'
77
self.base_url = 'https://doc.rust-lang.org/'
88
self.root_path = 'book/index.html'
99
self.initial_paths = %w(

0 commit comments

Comments
 (0)