summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com>2019-08-25 12:52:52 +0200
committerPierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com>2019-08-25 12:52:52 +0200
commitfb2f5853ad9823a6aa8018a2e5d5b96f9b34dbd5 (patch)
tree6ca242cd1e69284c06a3be21cbab4ddc2a3b204a /examples
parentfadaa64ec513177feeb858b0977b4c18899b4961 (diff)
Updated to rust 2018
Diffstat (limited to 'examples')
-rw-r--r--examples/basic.rs4
-rw-r--r--examples/csv.rs2
-rw-r--r--examples/formatting.rs4
-rw-r--r--examples/multiline.rs4
-rw-r--r--examples/slices.rs5
-rw-r--r--examples/span.rs4
-rw-r--r--examples/style.rs4
-rw-r--r--examples/tictactoe.rs6
8 files changed, 7 insertions, 26 deletions
diff --git a/examples/basic.rs b/examples/basic.rs
index 1e5cf35..0bbab1f 100644
--- a/examples/basic.rs
+++ b/examples/basic.rs
@@ -1,6 +1,4 @@
-#[macro_use]
-extern crate prettytable;
-use prettytable::{Table, Row, Cell};
+use prettytable::{Table, Row, Cell, row, table, ptable};
/*
Following main function will print :
diff --git a/examples/csv.rs b/examples/csv.rs
index 8dbaab1..4a94afb 100644
--- a/examples/csv.rs
+++ b/examples/csv.rs
@@ -1,5 +1,3 @@
-extern crate prettytable;
-
/*
Following main function will print :
+---------+------+---------+
diff --git a/examples/formatting.rs b/examples/formatting.rs
index 7822866..e6e9aa0 100644
--- a/examples/formatting.rs
+++ b/examples/formatting.rs
@@ -1,6 +1,4 @@
-#[macro_use]
-extern crate prettytable;
-use prettytable::format;
+use prettytable::{format, table, row};
fn main() {
let mut table = table!(["Value 1", "Value 2"], ["Value three", "Value four"]);
diff --git a/examples/multiline.rs b/examples/multiline.rs
index a453255..143815d 100644
--- a/examples/multiline.rs
+++ b/examples/multiline.rs
@@ -1,6 +1,4 @@
-#[macro_use]
-extern crate prettytable;
-
+use prettytable::table;
/*
Following main function will print :
+-------------------------+------------------------------+
diff --git a/examples/slices.rs b/examples/slices.rs
index e66ba36..9130718 100644
--- a/examples/slices.rs
+++ b/examples/slices.rs
@@ -1,7 +1,4 @@
-#[macro_use]
-extern crate prettytable;
-
-use prettytable::Slice;
+use prettytable::{Slice, table, row};
fn main() {
let mut table = table![[0, 0, 0], [1, 1, 1], [2, 2, 2], [3, 3, 3], [4, 4, 4], [5, 5, 5]];
diff --git a/examples/span.rs b/examples/span.rs
index 10f1ef7..5c3b4e2 100644
--- a/examples/span.rs
+++ b/examples/span.rs
@@ -1,6 +1,4 @@
-#[macro_use]
-extern crate prettytable;
-use prettytable::{Row, Cell, format::Alignment};
+use prettytable::{Row, Cell, format::Alignment, table};
fn main() {
diff --git a/examples/style.rs b/examples/style.rs
index 1d93e07..ad3c4e3 100644
--- a/examples/style.rs
+++ b/examples/style.rs
@@ -1,8 +1,6 @@
-#[macro_use]
-extern crate prettytable;
use prettytable::{Table, Row, Cell};
-
use prettytable::{Attr, color};
+use prettytable::{table, row, cell, ptable};
#[allow(dead_code)]
fn main() {
diff --git a/examples/tictactoe.rs b/examples/tictactoe.rs
index 727fc8e..0ff7207 100644
--- a/examples/tictactoe.rs
+++ b/examples/tictactoe.rs
@@ -1,8 +1,4 @@
-#[macro_use]
-extern crate prettytable;
-extern crate term;
-
-use prettytable::Table;
+use prettytable::{Table, table, cell};
use std::io;
use std::io::Write;