Skip to content

Commit afe2575

Browse files
authored
Rollup merge of #109009 - notriddle:notriddle/edit-distance, r=GuillaumeGomez
rustdoc: use restricted Damerau-Levenshtein distance for search Based on #108200, for the same rationale. > This replaces the existing Levenshtein algorithm with the Damerau-Levenshtein algorithm. This means that "ab" to "ba" is one change (a transposition) instead of two (a deletion and insertion). More specifically, this is a restricted implementation, in that "ca" to "abc" cannot be performed as "ca" → "ac" → "abc", as there is an insertion in the middle of a transposition. I believe that errors like that are sufficiently rare that it's not worth taking into account. Before this change, searching [`prinltn!`] listed `print!` first, followed by `println!`. With this change, `println!` matches more closely. [`prinltn!`]: https://doc.rust-lang.org/nightly/std/?search=prinltn!
2 parents f41796e + ce795d9 commit afe2575

File tree

2 files changed

+235
-149
lines changed

2 files changed

+235
-149
lines changed

0 commit comments

Comments
 (0)