diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-05-03 23:53:54 +0200 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-05-03 23:53:54 +0200 |
| commit | 54c663c01a63521ec7959eceed96af1f3f98ecb5 (patch) | |
| tree | 7b876f3592daf08478f412187036f6cd8ef675d3 | |
| parent | 13cdb0218c4ba9a0b531f41e49964704932d2510 (diff) | |
| download | mail-54c663c01a63521ec7959eceed96af1f3f98ecb5.tar.gz | |
add todo
| -rw-r--r-- | src/window.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/window.rs b/src/window.rs index a2f2b68..baabc30 100644 --- a/src/window.rs +++ b/src/window.rs @@ -18,6 +18,7 @@ pub enum Line { } pub fn truncate_dots(s: &str, to: usize) -> String { + //TODO We don't have time to do this every tick let graphemes = s.graphemes(true).collect::<Vec<_>>(); if graphemes.len() >= to { format!("{}...", graphemes.iter().take(to - 3).fold(String::new(), |acc, s| format!("{}{}", acc, s))) |
