fix: remove array_into_iter warnings

This commit is contained in:
Florian Dehau 2020-02-23 16:20:54 +01:00
parent 808a5c9ffd
commit 67dd1ac608
2 changed files with 2 additions and 2 deletions

View file

@ -241,7 +241,7 @@ where
}; };
Row::StyledData(vec![s.name, s.location, s.status].into_iter(), style) Row::StyledData(vec![s.name, s.location, s.status].into_iter(), style)
}); });
Table::new(header.into_iter(), rows) Table::new(header.iter(), rows)
.block(Block::default().title("Servers").borders(Borders::ALL)) .block(Block::default().title("Servers").borders(Borders::ALL))
.header_style(Style::default().fg(Color::Yellow)) .header_style(Style::default().fg(Color::Yellow))
.widths(&[ .widths(&[

View file

@ -68,7 +68,7 @@ fn main() -> Result<(), failure::Error> {
.constraints([Constraint::Percentage(100)].as_ref()) .constraints([Constraint::Percentage(100)].as_ref())
.margin(5) .margin(5)
.split(f.size()); .split(f.size());
Table::new(header.into_iter(), rows) Table::new(header.iter(), rows)
.block(Block::default().borders(Borders::ALL).title("Table")) .block(Block::default().borders(Borders::ALL).title("Table"))
.widths(&[ .widths(&[
Constraint::Percentage(50), Constraint::Percentage(50),