summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorpierresy <pierre-henri.symoneaux@alcatel-lucent.com>2015-08-12 13:53:07 +0200
committerpierresy <pierre-henri.symoneaux@alcatel-lucent.com>2015-08-12 13:53:07 +0200
commit97d22d53eb7c7144e18aa6f419f8ff8dacc5ba52 (patch)
treed5446463192ee2ffeb614b5c041d96d9235f92d7 /examples
parent7a800eb1ae6d3c93220f59ae995e492c0fd8a1e1 (diff)
Added customizable alignment
Added customizable alignment for text in cells (left, center, right). Also with additional small improvements
Diffstat (limited to 'examples')
-rw-r--r--examples/basic.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/basic.rs b/examples/basic.rs
index 13cc661..a7def3a 100644
--- a/examples/basic.rs
+++ b/examples/basic.rs
@@ -26,13 +26,13 @@ fn main() {
table.add_row(row!["ABC", "DEFG", "HIJKLMN"]);
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())])
+ Cell::new("foobar2"),
+ Cell::new("bar2"),
+ Cell::new("foo2")])
);
table.printstd();
println!("Modified : ");
- table.set_element(&"new_foo".to_string(), 2, 1).unwrap();
+ table.set_element("new_foo", 2, 1).unwrap();
table.printstd();
// The same table can be built the following way :