Skip to content

Commit

Permalink
tabled/ remove papergrid from public sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiburt committed Nov 20, 2021
1 parent f7be31f commit 25841e2
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/basic.rs
@@ -1,7 +1,7 @@
//! The example can be run by this command
//! `cargo run --example basic`

use tabled::{papergrid::AlignmentHorizontal, Alignment, Head, Modify, Row, Style, Table, Tabled};
use tabled::{Alignment, AlignmentHorizontal, Head, Modify, Row, Style, Table, Tabled};

#[derive(Tabled)]
struct Distribution {
Expand Down
3 changes: 1 addition & 2 deletions examples/inline.rs
Expand Up @@ -2,8 +2,7 @@
//! `cargo run --example inline`

use tabled::{
papergrid::AlignmentHorizontal, Alignment, Full, Head, Indent, Modify, Row, Style, Table,
Tabled,
Alignment, AlignmentHorizontal, Full, Head, Indent, Modify, Row, Style, Table, Tabled,
};

fn main() {
Expand Down
4 changes: 1 addition & 3 deletions examples/panel.rs
@@ -1,9 +1,7 @@
//! The example can be run by this command
//! `cargo run --example panel`

use tabled::{
papergrid::AlignmentHorizontal, Alignment, Footer, Full, Header, Modify, Style, Table, Tabled,
};
use tabled::{Alignment, AlignmentHorizontal, Footer, Full, Header, Modify, Style, Table, Tabled};

#[derive(Tabled)]
struct Release {
Expand Down
8 changes: 4 additions & 4 deletions src/alignment.rs
@@ -1,9 +1,9 @@
use crate::CellOption;
#[allow(unused)]
use crate::Table;
use papergrid::{AlignmentHorizontal, AlignmentVertical, Entity, Grid, Settings};
use papergrid::{Entity, Grid, Settings};

/// Alignment represent a horizontal and vertical alignemt setting for any cell on a [Table].
pub use papergrid::{AlignmentHorizontal, AlignmentVertical};

/// Alignment represent a horizontal and vertical alignemt setting for any cell on a [crate::Table].
///
/// ```rust,no_run
/// # use tabled::{Style, Alignment, Modify, Row, Table};
Expand Down
4 changes: 3 additions & 1 deletion src/highlight.rs
@@ -1,7 +1,9 @@
#[allow(unused)]
use crate::Table;
use crate::TableOption;
use papergrid::{Border, Entity, Grid, Settings};
use papergrid::{Entity, Grid, Settings};

pub use papergrid::Border;

pub struct Highlight {
target: Target,
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Expand Up @@ -141,7 +141,7 @@
//! [README.md](https://github.com/zhiburt/tabled/blob/master/README.md)
//!

use papergrid::{AlignmentHorizontal, Entity, Grid, Settings};
use papergrid::{Entity, Grid, Settings};
use std::fmt;

mod alignment;
Expand All @@ -160,8 +160,7 @@ pub use crate::{
alignment::*, disable::*, formating::*, highlight::*, indent::*, object::*, panel::*,
rotate::*, style::Style, width::*,
};
// todo: Remove this publice exposure
pub use papergrid;

pub use tabled_derive::Tabled;

/// Tabled a trait responsible for providing a header fields and a row fields.
Expand Down
3 changes: 1 addition & 2 deletions tests/highlingt_test.rs
@@ -1,6 +1,5 @@
use crate::util::create_vector;
use papergrid::Border;
use tabled::{Highlight, Style, Table};
use tabled::{Border, Highlight, Style, Table};

mod util;

Expand Down
3 changes: 1 addition & 2 deletions tests/panel_test.rs
@@ -1,7 +1,6 @@
use crate::util::create_vector;
use tabled::{
papergrid::Border, Alignment, Footer, Full, Header, Highlight, Modify, Object, Panel, Row,
Style, Table,
Alignment, Border, Footer, Full, Header, Highlight, Modify, Object, Panel, Row, Style, Table,
};

mod util;
Expand Down
2 changes: 1 addition & 1 deletion tests/rotate_test.rs
@@ -1,6 +1,6 @@
// todo: add method for SPACING between cells.
// add MARGIN && PADDING instead of indent?
use tabled::{papergrid::Border, Highlight, Rotate, Style, Table};
use tabled::{Border, Highlight, Rotate, Style, Table};

#[test]
fn test_rotate() {
Expand Down

0 comments on commit 25841e2

Please sign in to comment.