Commit d82a085
committed
rustdoc-search: clean up
This computes the same result with less code by computing many of
the old checks at once:
* It won't enter the loop if clength > length, because then the
result of length - clength will be negative and the
loop conditional will fail.
* i + clength will never be greater than length, because it
starts out as i = length - clength, implying that i + clength
equals length, and it only goes down from there.
* The aborted variable is replaced with control flow.checkPath
1 parent 2f8d81f commit d82a085
1 file changed
+3
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1840 | 1840 | | |
1841 | 1841 | | |
1842 | 1842 | | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
| 1843 | + | |
1850 | 1844 | | |
1851 | | - | |
1852 | 1845 | | |
1853 | 1846 | | |
1854 | 1847 | | |
1855 | | - | |
1856 | | - | |
| 1848 | + | |
1857 | 1849 | | |
1858 | 1850 | | |
1859 | 1851 | | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
| 1852 | + | |
1863 | 1853 | | |
1864 | 1854 | | |
1865 | 1855 | | |
| |||
0 commit comments