diff options
Diffstat (limited to 'alacritty_terminal/src')
-rw-r--r-- | alacritty_terminal/src/ansi.rs | 2 | ||||
-rw-r--r-- | alacritty_terminal/src/index.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs index 55492d36..25ea8af3 100644 --- a/alacritty_terminal/src/ansi.rs +++ b/alacritty_terminal/src/ansi.rs @@ -697,6 +697,7 @@ pub enum NamedColor { } impl NamedColor { + #[must_use] pub fn to_bright(self) -> Self { match self { NamedColor::Foreground => NamedColor::BrightForeground, @@ -721,6 +722,7 @@ impl NamedColor { } } + #[must_use] pub fn to_dim(self) -> Self { match self { NamedColor::Black => NamedColor::DimBlack, diff --git a/alacritty_terminal/src/index.rs b/alacritty_terminal/src/index.rs index 29b3eb15..e672c752 100644 --- a/alacritty_terminal/src/index.rs +++ b/alacritty_terminal/src/index.rs @@ -20,6 +20,7 @@ pub enum Direction { } impl Direction { + #[must_use] pub fn opposite(self) -> Self { match self { Side::Right => Side::Left, @@ -133,6 +134,7 @@ pub struct Line(pub i32); impl Line { /// Clamp a line to a grid boundary. + #[must_use] pub fn grid_clamp<D: Dimensions>(self, dimensions: &D, boundary: Boundary) -> Self { match boundary { Boundary::Cursor => max(Line(0), min(dimensions.bottommost_line(), self)), |