From cf7dca33e2e2131c20e4bbc34ad222c5e6edc29a Mon Sep 17 00:00:00 2001 From: Pierre-Henri Symoneaux Date: Mon, 26 Aug 2019 23:48:51 +0200 Subject: Privatize deprecated functions functions for #87 --- src/row.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/row.rs') diff --git a/src/row.rs b/src/row.rs index d3a9d86..ae14429 100644 --- a/src/row.rs +++ b/src/row.rs @@ -31,8 +31,8 @@ impl Row { /// Count the number of column required in the table grid. /// It takes into account horizontal spanning of cells. For /// example, a cell with an hspan of 3 will add 3 column to the grid - #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] - pub fn column_count(&self) -> usize { + // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] + pub (crate) fn column_count(&self) -> usize { self.cells.iter().map(|c| c.get_hspan()).sum() } @@ -48,8 +48,8 @@ impl Row { } /// Get the height of this row - #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] - pub fn get_height(&self) -> usize { + // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] + fn get_height(&self) -> usize { let mut height = 1; // Minimum height must be 1 to print empty rows for cell in &self.cells { let h = cell.get_height(); @@ -62,8 +62,8 @@ impl Row { /// Get the minimum width required by the cell in the column `column`. /// Return 0 if the cell does not exist in this row - #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] - pub fn get_column_width(&self, column: usize, format: &TableFormat) -> usize { + // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] + pub (crate) fn get_column_width(&self, column: usize, format: &TableFormat) -> usize { let mut i = 0; for c in &self.cells { if i + c.get_hspan() > column { @@ -186,8 +186,8 @@ impl Row { /// Print the row to `out`, with `separator` as column separator, and `col_width` /// specifying the width of each columns. Returns the number of printed lines - #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] - pub fn print(&self, + // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] + pub (crate) fn print(&self, out: &mut T, format: &TableFormat, col_width: &[usize]) @@ -197,8 +197,8 @@ impl Row { /// Print the row to terminal `out`, with `separator` as column separator, and `col_width` /// specifying the width of each columns. Apply style when needed. returns the number of printed lines - #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] - pub fn print_term(&self, + // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")] + pub (crate) fn print_term(&self, out: &mut T, format: &TableFormat, col_width: &[usize]) -- cgit v1.2.3