]> git.proxmox.com Git - cargo.git/commit - tests/testsuite/cargo_command.rs
Make levenshtein distance case insensitive.
authorMidas Lambrichts <midaslamb@gmail.com>
Tue, 21 Dec 2021 11:56:28 +0000 (12:56 +0100)
committerMidas Lambrichts <midaslamb@gmail.com>
Tue, 21 Dec 2021 11:56:28 +0000 (12:56 +0100)
commit42528799e2cc2faa4b71d9c46023720537fde460
treefa99c6166c8b90ee823804042f31056abeada1bc
parent47b869c107fbe0aa42444f46d59f4ba03ffa15fe
Make levenshtein distance case insensitive.

When typing in a single character shortcut as a capital, it always
returns `b` as the suggestion as every one-letter abbreviation
is a lev distance 1 away from the capitalized one.
By making the levenshtein distance case insensitive, the case-mismatched
one-letter abbriviation (e.g. `C` to `c`) will be suggested, rather
than `b`
src/cargo/util/lev_distance.rs
tests/testsuite/cargo_command.rs