diff options
author | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2015-06-01 20:01:58 +0200 |
---|---|---|
committer | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2015-06-01 20:05:24 +0200 |
commit | d61fd0e84055da1ed3ae31e9d6890ec4881274a7 (patch) | |
tree | a6fa6097be6b86c585d03d18bb2ce5e5ca12c242 /examples | |
parent | dd0bbaa788c9446bf694f0d8496a9af877a492ab (diff) |
Allow variable column number
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/basic.rs b/examples/basic.rs index 3996f4c..7cefeb8 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -23,12 +23,12 @@ use tabprint::cell::Cell; */
fn main() {
let mut table = Table::new(row!["ABC", "DEFG", "HIJKLMN"]);
- table.add_row(row!["foobar", "bar", "foo"]).unwrap();
+ table.add_row(row!["foobar", "bar", "foo"]);
table.add_row(Row::new(vec![
Cell::new(&"foobar2".to_string()),
Cell::new(&"bar2".to_string()),
Cell::new(&"foo2".to_string())])
- ).unwrap();
+ );
table.printstd();
println!("Modified : ");
table.set_element(&"new_foo".to_string(), 2, 1).unwrap();
|