Updated example

This commit is contained in:
Gerrit Viljoen 2020-04-01 21:18:07 +02:00
parent 1fd3fc0383
commit c9b4955773

View File

@ -5,11 +5,11 @@ Print ASCII tables to the terminal.
## Example ## Example
``` ```
use ascii_table::{TableConfig, print_table}; use ascii_table::AsciiTable;
let config = TableConfig::default(); let ascii_table = AsciiTable::default();
let data = vec![&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]; let data = vec![&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]];
print_table(data, &config); ascii_table.print(data);
// ┌───┬───┬───┐ // ┌───┬───┬───┐
// │ 1 │ 2 │ 3 │ // │ 1 │ 2 │ 3 │
// │ 4 │ 5 │ 6 │ // │ 4 │ 5 │ 6 │