mirror of
https://github.com/alacritty/alacritty.git
synced 2025-02-10 15:46:10 -05:00
Remove unused limit function
This commit is contained in:
parent
346ec09af5
commit
44b238bff8
1 changed files with 1 additions and 15 deletions
|
@ -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;
|
||||
|
@ -1737,13 +1730,6 @@ mod tests {
|
|||
assert_eq!(deserialized, grid);
|
||||
}
|
||||
|
||||
#[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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue