summaryrefslogtreecommitdiffstats
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorNathan Lilienthal <nathan@nixpulvis.com>2020-09-24 19:40:57 -0400
committerGitHub <noreply@github.com>2020-09-24 19:40:57 -0400
commit9a62f4729215a7ca4a69cf54df8663ff84c27ec2 (patch)
tree1118b056db598968fd3c550b089a9898e94875b2 /alacritty_terminal
parent62c300c14ce7a96373e0094763e9fd035b6b9b6d (diff)
Remove unused Linear newtype. (#4248)
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/index.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/alacritty_terminal/src/index.rs b/alacritty_terminal/src/index.rs
index baed323e..2c28bec2 100644
--- a/alacritty_terminal/src/index.rs
+++ b/alacritty_terminal/src/index.rs
@@ -220,28 +220,6 @@ impl fmt::Display for Column {
}
}
-/// A linear index.
-///
-/// Newtype to avoid passing values incorrectly.
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Default, Ord, PartialOrd, Serialize, Deserialize)]
-pub struct Linear(pub usize);
-
-impl Linear {
- pub fn new(columns: Column, column: Column, line: Line) -> Self {
- Linear(line.0 * columns.0 + column.0)
- }
-
- pub fn from_point(columns: Column, point: Point<usize>) -> Self {
- Linear(point.line * columns.0 + point.col.0)
- }
-}
-
-impl fmt::Display for Linear {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "Linear({})", self.0)
- }
-}
-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
@@ -485,7 +463,6 @@ macro_rules! ops {
ops!(Line, Line);
ops!(Column, Column);
-ops!(Linear, Linear);
#[cfg(test)]
mod tests {