about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-20 21:11:39 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-20 21:11:39 +0200
commit4d26bde4f0b24ca6121eec167bc8d48f4b7179cc (patch)
treeb2432927b0ff33449690e78faa0dda042dcf8b48
parent8d0e10cfbe9ca114a6470b6a26aa878ace5c03ba (diff)
downloadrust-4d26bde4f0b24ca6121eec167bc8d48f4b7179cc.tar.gz
rust-4d26bde4f0b24ca6121eec167bc8d48f4b7179cc.zip
Extend `handleSingleArg` documentation
-rw-r--r--src/librustdoc/html/static/js/search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index 260f2bcb2cd..0d4e0a0b328 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -1246,6 +1246,10 @@ window.initSearch = function(rawSearchIndex) {
 
         /**
          * This function is called in case the query is only one element (with or without generics).
+         * This element will be compared to arguments' and returned values' items and also to items.
+         *
+         * Other important thing to note: since there is only one element, we use levenshtein
+         * distance for name comparisons.
          *
          * @param {Row} row
          * @param {integer} pos              - Position in the `searchIndex`.