diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-03-27 22:01:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-27 22:01:06 -0400 |
commit | d297ee4639f65e9bb1c0c636ebe9faad075822c1 (patch) | |
tree | 2b23199b40b3c26803bfea0732649d928c345c63 /src/canvas/widgets/cpu_basic.rs | |
parent | 747497cc8a42b885673c90ca9e5c7fde3ddb5c64 (diff) |
refactor: remove some simple as-casts (#697)
Remove some simple as casts that are easy to change to .into(), or easy to check.
Diffstat (limited to 'src/canvas/widgets/cpu_basic.rs')
-rw-r--r-- | src/canvas/widgets/cpu_basic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/canvas/widgets/cpu_basic.rs b/src/canvas/widgets/cpu_basic.rs index 2c0da311..089502ec 100644 --- a/src/canvas/widgets/cpu_basic.rs +++ b/src/canvas/widgets/cpu_basic.rs @@ -70,7 +70,7 @@ impl CpuBasicWidget for Painter { const COMBINED_SPACING: usize = CPU_NAME_SPACE + BAR_BOUND_SPACE + PERCENTAGE_SPACE + MARGIN_SPACE; const REDUCED_SPACING: usize = CPU_NAME_SPACE + PERCENTAGE_SPACE + MARGIN_SPACE; - let chunk_width = chunks[0].width as usize; + let chunk_width: usize = chunks[0].width.into(); // Inspired by htop. // We do +4 as if it's too few bars in the bar length, it's kinda pointless. |