diff options
author | Joe Wilm <joe@jwilm.com> | 2016-06-09 08:30:55 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-06-09 08:30:55 -0700 |
commit | 8566e17860933ef1da36a88b5d3fd839352065b8 (patch) | |
tree | b6c0dc4502b200a024f748b018b82116c9d588ac /src/term.rs | |
parent | a60dbd564b44161f92a26ae401cf9b3ce5add982 (diff) | |
download | r-alacritty-8566e17860933ef1da36a88b5d3fd839352065b8.tar.gz r-alacritty-8566e17860933ef1da36a88b5d3fd839352065b8.tar.bz2 r-alacritty-8566e17860933ef1da36a88b5d3fd839352065b8.zip |
Fix all trivial compiler warnings
Of note are the `ansi` and `grid` modules becoming public. There are
several bits of unused code in each of these. In the case of `grid`, the
unused parts are generally useful, like some indexing implementations.
In ansi, there are pieces that will be used once the parser is more
complete. In any case, these modules are fairly generic and mostly
usable outside of Alacritty.
Unused cargo packages were also removed.
Diffstat (limited to 'src/term.rs')
-rw-r--r-- | src/term.rs | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/term.rs b/src/term.rs index 9d92e282..4c5e1424 100644 --- a/src/term.rs +++ b/src/term.rs @@ -1,8 +1,7 @@ /// Exports the `Term` type which is a high-level API for the Grid -use std::sync::Arc; use std::ops::Range; -use ansi::{self, Attr, DebugHandler}; +use ansi::{self, Attr}; use grid::{self, Grid, CellFlags}; use tty; use ::Rgb; @@ -70,10 +69,6 @@ impl Cursor { } } -struct Mover<'a> { - cursor: &'a mut Cursor, -} - pub struct Term { /// The grid grid: Grid, @@ -85,7 +80,7 @@ pub struct Term { alt: bool, /// Reference to the underlying tty - tty: tty::Tty, + _tty: tty::Tty, /// The cursor cursor: Cursor, @@ -130,7 +125,7 @@ impl Term { alt_cursor: Cursor::default(), fg: DEFAULT_FG, bg: DEFAULT_BG, - tty: tty, + _tty: tty, tabs: tabs, attr: CellFlags::empty(), mode: TermMode::empty(), @@ -157,10 +152,6 @@ impl Term { } } - pub fn resize(&mut self) { - unimplemented!(); - } - #[inline] pub fn cursor_x(&self) -> u16 { self.cursor.x @@ -195,13 +186,6 @@ impl Term { cell.flags = self.attr; } - /// Advance to next line - fn newline_c(&mut self, count: u16) { - // TODO handle scroll - self.cursor.x = 0; - self.cursor.y += 1; - } - /// Convenience function for scrolling fn scroll(&mut self, count: isize) { println!("[TERM] scrolling {} lines", count); @@ -299,6 +283,7 @@ impl ansi::Handler for Term { #[inline] fn backspace(&mut self, count: i64) { println!("backspace"); + // TODO this is incorrect; count unused self.cursor.x -= 1; self.set_char(' '); } @@ -357,7 +342,6 @@ impl ansi::Handler for Term { println!("clear_line: {:?}", mode); match mode { ansi::LineClearMode::Right => { - let cols = self.grid.num_cols(); let row = &mut self.grid[self.cursor.y as usize]; let start = self.cursor.x as usize; for cell in row[start..].iter_mut() { |