diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-01-06 16:41:02 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-01-06 16:41:02 +0000 |
| commit | fc2205c41542c6a1134854bd493036aa1d2238ce (patch) | |
| tree | 06781e340b39a1ec664ea26f32daa6be7e98d9cb /src/utils/shared.rs | |
| parent | Functional drawing of plugins to the screen (diff) | |
| download | sl0ppij-fc2205c41542c6a1134854bd493036aa1d2238ce.tar.gz sl0ppij-fc2205c41542c6a1134854bd493036aa1d2238ce.tar.xz sl0ppij-fc2205c41542c6a1134854bd493036aa1d2238ce.zip | |
The RawFd has been slain...
Diffstat (limited to 'src/utils/shared.rs')
| -rw-r--r-- | src/utils/shared.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/shared.rs b/src/utils/shared.rs index f5d4c303..c66d8ad1 100644 --- a/src/utils/shared.rs +++ b/src/utils/shared.rs @@ -4,7 +4,10 @@ use strip_ansi_escapes::strip; // FIXME: Should this be an extension trait? Or here at all? pub fn ansi_len(s: &str) -> usize { - from_utf8(&strip(s.as_bytes()).unwrap()).unwrap().chars().count() + from_utf8(&strip(s.as_bytes()).unwrap()) + .unwrap() + .chars() + .count() } pub fn pad_to_size(s: &str, rows: usize, columns: usize) -> String { |
