diff options
author | Wei Li <llwwns@gmail.com> | 2019-08-31 15:33:45 +0900 |
---|---|---|
committer | Wei Li <llwwns@gmail.com> | 2019-08-31 15:33:45 +0900 |
commit | f1ff953d4d34aab7dd8bce9d6cc5cc691d46944e (patch) | |
tree | 2a5f54134986db9308cf1619d9da31ceefe4ec5c | |
parent | 07cc0aefe5f5a140cb5c641a8ed5678ae01d9de6 (diff) |
fmt
-rw-r--r-- | src/ui/grid/row.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/grid/row.rs b/src/ui/grid/row.rs index b2b1275..3058f27 100644 --- a/src/ui/grid/row.rs +++ b/src/ui/grid/row.rs @@ -235,12 +235,11 @@ impl Rope { pub fn cell_at(&self, at: usize) -> Cell { match self { Rope::Leaf(leaf) => { - let c = leaf.text.chars().nth( - if leaf.double_width() { - 0 - } else { - at - 1 - }).unwrap(); + let c = leaf + .text + .chars() + .nth(if leaf.double_width() { 0 } else { at - 1 }) + .unwrap(); Cell { text: c.to_string(), hl_id: leaf.hl_id, |