diff options
author | Joe Wilm <joe@jwilm.com> | 2017-04-20 10:18:05 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2017-04-20 10:18:05 -0700 |
commit | 44b238bff8e9f97533b9457356c90ff5bcd49b14 (patch) | |
tree | 9ada99310255c8f3a3c2b00c45ba379230c459f0 /src | |
parent | 346ec09af5a274735833c207ddc40cf49c30bc8b (diff) | |
download | alacritty-44b238bff8e9f97533b9457356c90ff5bcd49b14.tar.gz alacritty-44b238bff8e9f97533b9457356c90ff5bcd49b14.zip |
Remove unused limit function
Diffstat (limited to 'src')
-rw-r--r-- | src/term/mod.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 68f6a5ac..8f80a18d 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -249,13 +249,6 @@ impl<'a> Iterator for RenderableCellsIter<'a> { } } -/// coerce val to be between min and max -#[inline] -fn limit<T: PartialOrd + Ord>(val: T, min_limit: T, max_limit: T) -> T { - use std::cmp::max; - min(max(min_limit, val), max_limit) -} - pub mod mode { bitflags! { pub flags TermMode: u16 { @@ -1641,7 +1634,7 @@ impl ansi::Handler for Term { mod tests { extern crate serde_json; - use super::{Cell, Term, limit, SizeInfo}; + use super::{Cell, Term, SizeInfo}; use term::cell; use grid::Grid; @@ -1738,13 +1731,6 @@ mod tests { } #[test] - fn limit_works() { - assert_eq!(limit(5, 1, 10), 5); - assert_eq!(limit(5, 6, 10), 6); - assert_eq!(limit(5, 1, 4), 4); - } - - #[test] fn input_line_drawing_character() { let size = SizeInfo { width: 21.0, |