fix(explain): align table correctly (#1482)

* fix(explain): align table correctly

* iterate over lines directly

* calculate desc_width with the actual space available

* custom unicode-aware textwrapping

* fix clippy error

* better width estimination

* explain +6

* move padding width into a constant
This commit is contained in:
David Knaack
2020-08-05 19:16:59 +02:00
committed by GitHub
parent 0be9ffc0a1
commit 8b0f589486
3 changed files with 62 additions and 37 deletions
Generated
+1 -11
View File
@@ -195,7 +195,7 @@ dependencies = [
"atty",
"bitflags",
"strsim",
"textwrap 0.11.0",
"textwrap",
"unicode-width",
"vec_map",
]
@@ -1110,7 +1110,6 @@ dependencies = [
"sysinfo",
"tempfile",
"term_size",
"textwrap 0.12.1",
"toml",
"unicode-segmentation",
"unicode-width",
@@ -1202,15 +1201,6 @@ dependencies = [
"unicode-width",
]
[[package]]
name = "textwrap"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789"
dependencies = [
"unicode-width",
]
[[package]]
name = "thread_local"
version = "1.0.1"