From 709738f7b50e06166b15be9f28e33a54b159150b Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 5 Oct 2024 10:02:51 +0200 Subject: Remove unused `Clone` requirements --- alacritty_terminal/src/grid/mod.rs | 6 +++--- alacritty_terminal/src/grid/resize.rs | 2 +- alacritty_terminal/src/grid/row.rs | 2 +- alacritty_terminal/src/grid/storage.rs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index 59769883..278bea3b 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -137,7 +137,7 @@ pub struct Grid { max_scroll_limit: usize, } -impl Grid { +impl Grid { pub fn new(lines: usize, columns: usize, max_scroll_limit: usize) -> Grid { Grid { raw: Storage::with_capacity(lines, columns), @@ -356,7 +356,7 @@ impl Grid { /// Reset a visible region within the grid. pub fn reset_region>(&mut self, bounds: R) where - T: ResetDiscriminant + GridCell + Clone + Default, + T: ResetDiscriminant + GridCell + Default, D: PartialEq, { let start = match bounds.start_bound() { @@ -392,7 +392,7 @@ impl Grid { #[inline] pub fn initialize_all(&mut self) where - T: GridCell + Clone + Default, + T: GridCell + Default, { // Remove all cached lines to clear them of any content. self.truncate(); diff --git a/alacritty_terminal/src/grid/resize.rs b/alacritty_terminal/src/grid/resize.rs index 92ee55d7..751abae1 100644 --- a/alacritty_terminal/src/grid/resize.rs +++ b/alacritty_terminal/src/grid/resize.rs @@ -9,7 +9,7 @@ use crate::term::cell::{Flags, ResetDiscriminant}; use crate::grid::row::Row; use crate::grid::{Dimensions, Grid, GridCell}; -impl Grid { +impl Grid { /// Resize the grid's width and/or height. pub fn resize(&mut self, reflow: bool, lines: usize, columns: usize) where diff --git a/alacritty_terminal/src/grid/row.rs b/alacritty_terminal/src/grid/row.rs index 4e22e50b..d4a6e6d3 100644 --- a/alacritty_terminal/src/grid/row.rs +++ b/alacritty_terminal/src/grid/row.rs @@ -30,7 +30,7 @@ impl PartialEq for Row { } } -impl Row { +impl Row { /// Create a new terminal row. /// /// Ideally the `template` should be `Copy` in all performance sensitive scenarios. diff --git a/alacritty_terminal/src/grid/storage.rs b/alacritty_terminal/src/grid/storage.rs index 0a2be43b..abf57103 100644 --- a/alacritty_terminal/src/grid/storage.rs +++ b/alacritty_terminal/src/grid/storage.rs @@ -66,7 +66,7 @@ impl Storage { #[inline] pub fn with_capacity(visible_lines: usize, columns: usize) -> Storage where - T: Clone + Default, + T: Default, { // Initialize visible lines; the scrollback buffer is initialized dynamically. let mut inner = Vec::with_capacity(visible_lines); @@ -79,7 +79,7 @@ impl Storage { #[inline] pub fn grow_visible_lines(&mut self, next: usize) where - T: Clone + Default, + T: Default, { // Number of lines the buffer needs to grow. let additional_lines = next - self.visible_lines; @@ -125,7 +125,7 @@ impl Storage { #[inline] pub fn initialize(&mut self, additional_rows: usize, columns: usize) where - T: Clone + Default, + T: Default, { if self.len + additional_rows > self.inner.len() { self.rezero(); -- cgit v1.2.3-54-g00ecf