add: fix a small lint (#1476)

This commit is contained in:
a-kenji 2022-06-10 11:42:47 +02:00 committed by GitHub
parent 5b0c2633e7
commit 9544a09786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -839,10 +839,10 @@ impl Grid {
let mut scrollback: String = dump_screen!(self.lines_above);
let viewport: String = dump_screen!(self.viewport);
if !scrollback.is_empty() {
scrollback.push_str("\n");
scrollback.push('\n');
}
scrollback.push_str(&viewport);
return scrollback;
scrollback
}
pub fn move_viewport_up(&mut self, count: usize) {
for _ in 0..count {

View File

@ -387,7 +387,7 @@ impl Pane for TerminalPane {
self.reflow_lines();
}
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) {
self.grid.move_viewport_up(count);

View File

@ -159,7 +159,7 @@ pub trait Pane {
fn pull_left(&mut self, count: usize);
fn pull_up(&mut self, count: usize);
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_down(&mut self, count: usize, client_id: ClientId);