From 3dbc6052bf131fa37516d473e44732ed7e2ad1a2 Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Sat, 6 Oct 2018 17:37:56 +0200 Subject: [PATCH] Fix Rust entries --- lib/docs/filters/rust/entries.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/docs/filters/rust/entries.rb b/lib/docs/filters/rust/entries.rb index e0b3ecad..eb427eba 100644 --- a/lib/docs/filters/rust/entries.rb +++ b/lib/docs/filters/rust/entries.rb @@ -42,11 +42,14 @@ module Docs 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| - name = node.at_css('.fnname').content - name.prepend "#{self.name}::" - [name, node['id']] - end + css('.method') + .select {|node| !node.at_css('.fnname').nil?} + .map {|node| + name = node.at_css('.fnname').content + name.prepend "#{self.name}::" + [name, node['id']] + } + .uniq {|item| item[0]} end end end