diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-05-18 23:34:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 23:34:50 -0400 |
commit | e6379982f17acedf964eaccd1c099da311e58bb3 (patch) | |
tree | 8c84ed99ec7832c9f9b7780c06fa00460183cd28 /src/canvas/widgets/mem_basic.rs | |
parent | 12e4777d97b98987991ce4670df477108356b42f (diff) |
refactor: reduce unchecked type conversions to usize
Diffstat (limited to 'src/canvas/widgets/mem_basic.rs')
-rw-r--r-- | src/canvas/widgets/mem_basic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/canvas/widgets/mem_basic.rs b/src/canvas/widgets/mem_basic.rs index 7c1b749a..05c7c39a 100644 --- a/src/canvas/widgets/mem_basic.rs +++ b/src/canvas/widgets/mem_basic.rs @@ -39,7 +39,7 @@ impl MemBasicWidget for Painter { } // +9 due to 3 + 4 + 2 + 2 columns for the name & space + percentage + bar bounds + margin spacing - let bar_length = draw_loc.width.saturating_sub(11) as usize; + let bar_length = usize::from(draw_loc.width.saturating_sub(11)); let ram_use_percentage = if let Some(mem) = mem_data.last() { mem.1 } else { |