-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated rust compatibility Fixed UT Added span support from macro Example + updated README Small update to README
- Loading branch information
Showing
7 changed files
with
204 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
language: rust | ||
rust: | ||
- 1.20.0 | ||
- 1.21.0 | ||
- 1.22.1 | ||
- 1.23.0 | ||
- 1.24.1 | ||
- 1.25.0 | ||
- 1.26.2 | ||
- 1.27.2 | ||
- 1.28.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#[macro_use] | ||
extern crate prettytable; | ||
use prettytable::{row::Row, cell::Cell, format::Alignment}; | ||
|
||
|
||
fn main() { | ||
|
||
/* | ||
The following code will output | ||
+---------------+---------------+--------------+ | ||
| A table with horizontal span | | ||
+===============+===============+==============+ | ||
| This is a cell with span of 2 | span of 1 | | ||
+---------------+---------------+--------------+ | ||
| span of 1 | span of 1 | span of 1 | | ||
+---------------+---------------+--------------+ | ||
| This cell with a span of 3 is centered | | ||
+---------------+---------------+--------------+ | ||
*/ | ||
|
||
let mut table: prettytable::Table = table![ | ||
[H2 -> "This is a cell with span of 2", "span of 1"], | ||
["span of 1", "span of 1", "span of 1"], | ||
[H03c -> "This cell with a span of 3 is centered"] | ||
]; | ||
table.set_titles(Row::new(vec![ | ||
Cell::new_align("A table with horizontal span", Alignment::CENTER).with_hspan(3) | ||
])); | ||
table.printstd(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.