Optimize example

pull/585/head
Isaac Mills 2 years ago
parent 00fde6f194
commit ff0627f102
No known key found for this signature in database
GPG Key ID: B67D7410F33A0F61

@ -113,10 +113,10 @@ fn draw_charts<B>(f: &mut Frame<B>, app: &mut App, area: Rect)
where
B: Backend,
{
let constraints = if app.show_chart {
vec![Constraint::Percentage(50), Constraint::Percentage(50)]
let constraints: &[Constraint] = if app.show_chart {
&[Constraint::Percentage(50), Constraint::Percentage(50)]
} else {
vec![Constraint::Percentage(100)]
&[Constraint::Percentage(100)]
};
let chunks = Layout::default()
.constraints(&constraints)

Loading…
Cancel
Save