aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/index.rs')
-rw-r--r--alacritty_terminal/src/index.rs2
1 files changed, 2 insertions, 0 deletions
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)),