diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-01-06 19:34:18 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-01-06 19:34:18 +0000 |
| commit | 1fa23e6fa4635a61a64ab0f53da1455c72b405d8 (patch) | |
| tree | 789be804ce4bdae3f9da02bdabea7322c6179bdb /src/boundaries.rs | |
| parent | A module rename to please clippy (diff) | |
| download | sl0ppij-1fa23e6fa4635a61a64ab0f53da1455c72b405d8.tar.gz sl0ppij-1fa23e6fa4635a61a64ab0f53da1455c72b405d8.tar.xz sl0ppij-1fa23e6fa4635a61a64ab0f53da1455c72b405d8.zip | |
Get clipped, fool
Diffstat (limited to 'src/boundaries.rs')
| -rw-r--r-- | src/boundaries.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/boundaries.rs b/src/boundaries.rs index 6d5eb3bc..498a3731 100644 --- a/src/boundaries.rs +++ b/src/boundaries.rs @@ -372,7 +372,7 @@ impl Boundaries { boundary_characters: HashMap::new(), } } - pub fn add_rect(&mut self, rect: &Box<dyn Pane>) { + pub fn add_rect(&mut self, rect: &dyn Pane) { if self.rect_right_boundary_is_before_screen_edge(rect) { // let boundary_x_coords = self.rect_right_boundary_x_coords(rect); let boundary_x_coords = rect.right_boundary_x_coords(); @@ -429,20 +429,20 @@ impl Boundaries { } vte_output } - fn rect_right_boundary_is_before_screen_edge(&self, rect: &Box<dyn Pane>) -> bool { + fn rect_right_boundary_is_before_screen_edge(&self, rect: &dyn Pane) -> bool { rect.x() + rect.columns() < self.columns } - fn rect_bottom_boundary_is_before_screen_edge(&self, rect: &Box<dyn Pane>) -> bool { + fn rect_bottom_boundary_is_before_screen_edge(&self, rect: &dyn Pane) -> bool { rect.y() + rect.rows() < self.rows } - fn rect_right_boundary_row_start(&self, rect: &Box<dyn Pane>) -> usize { + fn rect_right_boundary_row_start(&self, rect: &dyn Pane) -> usize { if rect.y() == 0 { 0 } else { rect.y() - 1 } } - fn rect_right_boundary_row_end(&self, rect: &Box<dyn Pane>) -> usize { + fn rect_right_boundary_row_end(&self, rect: &dyn Pane) -> usize { let rect_bottom_row = rect.y() + rect.rows(); // we do this because unless we're on the screen edge, we'd like to go one extra row to // connect to whatever boundary is beneath us @@ -452,14 +452,14 @@ impl Boundaries { rect_bottom_row + 1 } } - fn rect_bottom_boundary_col_start(&self, rect: &Box<dyn Pane>) -> usize { + fn rect_bottom_boundary_col_start(&self, rect: &dyn Pane) -> usize { if rect.x() == 0 { 0 } else { rect.x() - 1 } } - fn rect_bottom_boundary_col_end(&self, rect: &Box<dyn Pane>) -> usize { + fn rect_bottom_boundary_col_end(&self, rect: &dyn Pane) -> usize { let rect_right_col = rect.x() + rect.columns(); // we do this because unless we're on the screen edge, we'd like to go one extra column to // connect to whatever boundary is right of us |
