diff options
author | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2015-05-28 18:57:28 +0200 |
---|---|---|
committer | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2015-05-28 19:48:23 +0200 |
commit | e494978818e03e689b245576168e0e0bfa4d1e99 (patch) | |
tree | 03f9cd276f171036b195ea5e7f54f6245e3d0af2 /examples | |
parent | 59d08dbbe891ac145b125604497fe276f3c6ea87 (diff) |
Created ptable! macro
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/basic.rs b/examples/basic.rs index cbc7a91..459e89b 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,4 +1,4 @@ -extern crate tabprint;
+#[macro_use] extern crate tabprint;
use tabprint::Table;
/*
@@ -27,4 +27,10 @@ fn main() { println!("Modified : ");
table.set_element("new_foo".to_string(), 2, 1).unwrap();
table.printstd();
+
+ // The same table can be built the following way :
+ let _table = table!(["ABC", "DEFG", "HIJKLMN"],
+ ["foobar", "bar", "foo"],
+ ["foobar2", "bar2", "foo2"]
+ );
}
|