Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Mar 29, 2020
1 parent e8c00b7 commit 12fd993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tui-react/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ pub fn draw_text_without_ellipsis_nowrap<'a>(
) -> u16 {
let s = style.into();
let t = text.as_ref();
let mut graphemes = t.graphemes(true);
let graphemes = t.graphemes(true);
let mut total_width = 0;
{
let mut x_offset = 0;
for (g, mut x) in graphemes.by_ref().zip(bound.left()..bound.right()) {
for (g, mut x) in graphemes.zip(bound.left()..bound.right()) {
let width = g.width();
total_width += width;

Expand Down

0 comments on commit 12fd993

Please sign in to comment.