Break crate-descriptions at char-, not byte-boundary, avoiding a panic
authorLukas Lueg <lukas.lueg@gmail.com>
Mon, 4 Dec 2017 15:43:53 +0000 (16:43 +0100)
committerLukas Lueg <lukas.lueg@gmail.com>
Tue, 5 Dec 2017 12:28:15 +0000 (13:28 +0100)
commitbe48e92f17ebc5986e121f11bac784fc863303e9
tree27b1b7795ad94c2a70a542d80cc518356f701960
parent7f0583bd400dcb6ad59ca4b172c2fd41a9c1e5d9
Break crate-descriptions at char-, not byte-boundary, avoiding a panic

Long running descriptions were truncated at byte-boundary, leading to a
panic during registry::search(); we now break at char-boundary.
Also take length of names-column into account to shorten descriptions.

Fixes #4771.
src/cargo/ops/registry.rs