add: fix a small lint (#1476)
This commit is contained in:
parent
5b0c2633e7
commit
9544a09786
3 changed files with 4 additions and 4 deletions
|
|
@ -839,10 +839,10 @@ impl Grid {
|
||||||
let mut scrollback: String = dump_screen!(self.lines_above);
|
let mut scrollback: String = dump_screen!(self.lines_above);
|
||||||
let viewport: String = dump_screen!(self.viewport);
|
let viewport: String = dump_screen!(self.viewport);
|
||||||
if !scrollback.is_empty() {
|
if !scrollback.is_empty() {
|
||||||
scrollback.push_str("\n");
|
scrollback.push('\n');
|
||||||
}
|
}
|
||||||
scrollback.push_str(&viewport);
|
scrollback.push_str(&viewport);
|
||||||
return scrollback;
|
scrollback
|
||||||
}
|
}
|
||||||
pub fn move_viewport_up(&mut self, count: usize) {
|
pub fn move_viewport_up(&mut self, count: usize) {
|
||||||
for _ in 0..count {
|
for _ in 0..count {
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ impl Pane for TerminalPane {
|
||||||
self.reflow_lines();
|
self.reflow_lines();
|
||||||
}
|
}
|
||||||
fn dump_screen(&mut self, _client_id: ClientId) -> String {
|
fn dump_screen(&mut self, _client_id: ClientId) -> String {
|
||||||
return self.grid.dump_screen();
|
self.grid.dump_screen()
|
||||||
}
|
}
|
||||||
fn scroll_up(&mut self, count: usize, _client_id: ClientId) {
|
fn scroll_up(&mut self, count: usize, _client_id: ClientId) {
|
||||||
self.grid.move_viewport_up(count);
|
self.grid.move_viewport_up(count);
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ pub trait Pane {
|
||||||
fn pull_left(&mut self, count: usize);
|
fn pull_left(&mut self, count: usize);
|
||||||
fn pull_up(&mut self, count: usize);
|
fn pull_up(&mut self, count: usize);
|
||||||
fn dump_screen(&mut self, _client_id: ClientId) -> String {
|
fn dump_screen(&mut self, _client_id: ClientId) -> String {
|
||||||
return "".to_owned();
|
"".to_owned()
|
||||||
}
|
}
|
||||||
fn scroll_up(&mut self, count: usize, client_id: ClientId);
|
fn scroll_up(&mut self, count: usize, client_id: ClientId);
|
||||||
fn scroll_down(&mut self, count: usize, client_id: ClientId);
|
fn scroll_down(&mut self, count: usize, client_id: ClientId);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue