Skip to content

Commit

Permalink
fix: don't panic when rendering to empty area
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Jan 23, 2025
1 parent 16d01de commit 6550422
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tui-scrollview/src/scroll_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,14 +598,12 @@ mod tests {
)
}
#[rstest]
#[should_panic(expected = "Scrollbar area is empty")]
fn zero_width(scroll_view: ScrollView) {
let mut buf = Buffer::empty(Rect::new(0, 0, 0, 10));
let mut state = ScrollViewState::new();
scroll_view.render(buf.area, &mut buf, &mut state);
}
#[rstest]
#[should_panic(expected = "Scrollbar area is empty")]
fn zero_height(scroll_view: ScrollView) {
let mut buf = Buffer::empty(Rect::new(0, 0, 10, 0));
let mut state = ScrollViewState::new();
Expand Down

0 comments on commit 6550422

Please sign in to comment.