test: improve testability of input events
All checks were successful
Rust / build_and_test (push) Successful in 22s
All checks were successful
Rust / build_and_test (push) Successful in 22s
This commit is contained in:
@@ -12,7 +12,7 @@ fn render_list_into_buffer(
|
||||
width: u16,
|
||||
height: u16,
|
||||
) -> Buffer {
|
||||
let backend = TestBackend::new(width.into(), height.into());
|
||||
let backend = TestBackend::new(width, height);
|
||||
let mut terminal = Terminal::new(backend).expect("create terminal");
|
||||
|
||||
let lines_vec: Vec<ListItem> = lines
|
||||
@@ -45,8 +45,8 @@ fn render_list_into_buffer(
|
||||
|
||||
// Extract the underlying backend buffer (clone to own it)
|
||||
let backend = terminal.backend();
|
||||
let buf = backend.buffer().clone();
|
||||
buf
|
||||
|
||||
backend.buffer().clone()
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user