diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-10-17 18:35:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-17 18:35:21 -0400 |
commit | b8606c41b9343173b9265c157726f15c3aaa9bbb (patch) | |
tree | d5e75374de8745aa7fe7dbdd457cd2289efc6960 /src/canvas/widgets/process_table.rs | |
parent | 914079868f0bc5d1b709953bd8aaf0486ba32f65 (diff) |
refactor: Remove redundant as_ref() calls (#268)
Minor refactor to remove redundant `as_ref()` calls.
Diffstat (limited to 'src/canvas/widgets/process_table.rs')
-rw-r--r-- | src/canvas/widgets/process_table.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/canvas/widgets/process_table.rs b/src/canvas/widgets/process_table.rs index 970dcda1..727abb94 100644 --- a/src/canvas/widgets/process_table.rs +++ b/src/canvas/widgets/process_table.rs @@ -71,7 +71,7 @@ impl ProcessTableWidget for Painter { if process_widget_state.is_search_enabled() { let processes_chunk = Layout::default() .direction(Direction::Vertical) - .constraints([Constraint::Min(0), Constraint::Length(search_height)].as_ref()) + .constraints([Constraint::Min(0), Constraint::Length(search_height)]) .split(draw_loc); proc_draw_loc = processes_chunk[0]; @@ -87,7 +87,7 @@ impl ProcessTableWidget for Painter { if is_sort_open { let processes_chunk = Layout::default() .direction(Direction::Horizontal) - .constraints([Constraint::Length(header_len + 4), Constraint::Min(0)].as_ref()) + .constraints([Constraint::Length(header_len + 4), Constraint::Min(0)]) .split(proc_draw_loc); proc_draw_loc = processes_chunk[1]; @@ -118,7 +118,7 @@ impl ProcessTableWidget for Painter { let is_on_widget = widget_id == app_state.current_widget.widget_id; let margined_draw_loc = Layout::default() - .constraints([Constraint::Percentage(100)].as_ref()) + .constraints([Constraint::Percentage(100)]) .horizontal_margin(if is_on_widget || draw_border { 0 } else { 1 }) .direction(Direction::Horizontal) .split(draw_loc)[0]; @@ -647,7 +647,7 @@ impl ProcessTableWidget for Painter { }; let margined_draw_loc = Layout::default() - .constraints([Constraint::Percentage(100)].as_ref()) + .constraints([Constraint::Percentage(100)]) .horizontal_margin(if is_on_widget || draw_border { 0 } else { 1 }) .direction(Direction::Horizontal) .split(draw_loc)[0]; @@ -764,7 +764,7 @@ impl ProcessTableWidget for Painter { }; let margined_draw_loc = Layout::default() - .constraints([Constraint::Percentage(100)].as_ref()) + .constraints([Constraint::Percentage(100)]) .horizontal_margin(if is_on_widget || draw_border { 0 } else { 1 }) .direction(Direction::Horizontal) .split(draw_loc)[0]; |